Page_Load Runs Twice?

  • Thread starter Thread starter Mike Trebilcock
  • Start date Start date
M

Mike Trebilcock

I have setup a number of trace outputs to try and track down an error in a
process within my webpage. In doing so I have noticed that the pageload sub
is running twice, once after the other. Is this a feature or have I done
something?

Mike
 
Mike- you do need to share your codes. One of the reason could be- page_load
event is referenced in the .aspx file but I am not certain w/o looking at
the codes.

Prodip
www.aspnet4you.com
 
Hi Mike,

Make sure that AutoEventWireup is set to false in your @Page directive.
If it is set to true, Visual Studio automatically hooks up event
handlers.

Hope this helps.

Tod Birdsall, MCSD
http://tod1d.blogspot.com
 
I had smart navigation switched on to see what it did! Mess everything
around by the looks of things.

Thanks for all the replies, I ahve now turned it off and everything is as
running as it should.

Mike
 
Well, now you know!

;-)

Glad to see that was what was happening,
and that switching off SmartNavigation was the fix.

Mind you...you can *still* use SmartNavigation if you need it,
but you'll have to install the hotfix for it to work correctly.

Carry on!


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
 
Back
Top