aspx pages load twice

S

Sylvain Lafontaine

Most of the time, this is caused by the property AutoEventWireup set to true
instead of false.

S. L.
 
S

surveyor04

Can someone help me try to figure out why my pages load twice? While
debugging other issues, I notice that a great many of my pages run
through the onload method twice, and sometimes they run through the
onclick method of buttons two times as well. As far as onlick is
concerned, I checked the .NET designer code and there is only 1 event
handler wired up, so I don't know why these actions are occuring in
duplicate. Is there a way to trace through and find out why?
 
B

Brian

I've had large chunks of code execute twice, due to bad programming on my
part.

Sometimes I needed to add a if(!Page.IsPostBack){ ... } wrapper to certain
function calls to make sure they only executed on the intial page load..
other times, I had certain objects or user controls with ViewState enabled
(which is default) but not always necessary and occasionally triggered
unanticpated code execution.
 
P

Patrick Olurotimi Ige

Try setting AutoEventWireup set to false..
Cos i think by default its true.I had the smae problem once but this
fixed it..
Patrick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top