Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > aspx pages load twice

Reply
Thread Tools

aspx pages load twice

 
 
Sylvain Lafontaine
Guest
Posts: n/a
 
      02-12-2005
Most of the time, this is caused by the property AutoEventWireup set to true
instead of false.

S. L.

"surveyor04" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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?
>
>
>
> --
> surveyor04
> ------------------------------------------------------------------------
> Posted via http://www.codecomments.com
> ------------------------------------------------------------------------
>



 
Reply With Quote
 
 
 
 
surveyor04
Guest
Posts: n/a
 
      02-12-2005

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?



--
surveyor04
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      02-12-2005
Are you running with ASP.NET 1.1 sp1?

Microsoft .NET Framework 1.1 Page_Load Event Fires Two Times

http://support.microsoft.com/kb/827801

http://support.microsoft.com/kb/885055


"surveyor04" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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?
>
>
>
> --
> surveyor04
> ------------------------------------------------------------------------
> Posted via http://www.codecomments.com
> ------------------------------------------------------------------------
>


 
Reply With Quote
 
Brian
Guest
Posts: n/a
 
      02-14-2005
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.


"surveyor04" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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?
>
>
>
> --
> surveyor04
> ------------------------------------------------------------------------
> Posted via http://www.codecomments.com
> ------------------------------------------------------------------------
>



 
Reply With Quote
 
Patrick Olurotimi Ige
Guest
Posts: n/a
 
      02-14-2005
Try setting AutoEventWireup set to false..
Cos i think by default its true.I had the smae problem once but this
fixed it..
Patrick



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
twice(twice(x)) Kiuhnm C++ 2 04-01-2006 04:41 PM
passing variables from .aspx.cs code pages to .aspx pages RadioSignal ASP .Net Web Controls 7 10-21-2005 11:41 PM
adding main.aspx.vb & main.aspx.resx under aspx John M ASP .Net 1 05-29-2005 09:27 PM
aspx pages load twice surveyor04 ASP .Net 0 02-14-2005 05:04 PM
All pages in ASP.NET application load twice Krzysztof Rozmus ASP .Net 3 07-25-2003 08:11 AM



Advertisments