Link to home
Start Free TrialLog in
Avatar of HLRosenberger
HLRosenbergerFlag for United States of America

asked on

Page_Load

Page_Load gets called when a page is loaded, correct?  I have a case where I see it getting called only on the first load.  Maybe I'm not understanding something, or maybe the page is never totally unloaded.  But, my page is displayed the first time, I get Page_Load event, and then I click the X in the upper right corner to close it.  Now, the second time the page is displayed I do not get the Page_Load event.  Amy ideas what is wrong?  I'm running inside Visual Studio.
Avatar of jafrazee
jafrazee

Page_load is called everytime the page is refreshed,  It is part of the page life cycle.  The page only lives as long as a new request has not happened.
What is making you believe that Page_Load is not happening.
Do you have code that is not executing in the page_load
Put a break point at the start of the page_load.
You will see it stop.
maybe you have caching enabled
Avatar of Nasir Razzaq
Do you mean a breakpoint is not hit or do you mean the code in page_load is not run? The break points will only hit if you run the page from the VS.
Avatar of HLRosenberger

ASKER

yes.  I have a break point, and I only get the Page_Load event once.  
ASKER CERTIFIED SOLUTION
Avatar of fernandovitale
fernandovitale
Flag of Argentina image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As I said, the breakpoint will only hit if you run the page from within the visual studio.
This is my fault.  has to do with Postback.  Thanks for your help.
Thanks