Page Load Won't Fire

  • Thread starter Thread starter Curt Emich
  • Start date Start date
C

Curt Emich

I'm started a C# program that runs over an Access database. Initially, it's
supposed to load a field from a table into a dropdown list box. That wasn't
happening. When I did some diagnostics, it turned out that the program is
not even getting into the Page_Load() event. Do you have any idea why this
might be the case?
 
Hi Curt

Check if your page_Load event is registered in the event handler (InitializeComponent

----- Curt Emich wrote: ----

I'm started a C# program that runs over an Access database. Initially, it'
supposed to load a field from a table into a dropdown list box. That wasn'
happening. When I did some diagnostics, it turned out that the program i
not even getting into the Page_Load() event. Do you have any idea why thi
might be the case
 
At this point, the only line in InitializeComponent is:


this.Load += new System.EventHandler(this.Page_Load);



Someone else told me about deleting the Page_Load and its handler and
then re-selecting that event from some dropdown in the IDE, which would
re-insert it and allow me to cut my code back in and VIOLA! it would
work. I've seen quirkly stuff like this in other environments. Problem
is, I couldn't see where they were getting a dropdown list to "select"
the Page_Load event from anywhere. Do you know about this?
 
are you using code behind or scripting the page_load event in the aspx file?

if scripting, did you happen to paste the code into a page which inherits a
class that has the page_load defined in it's code?
 
check if you jave this line of code

this.Load += new System.EventHandler(this.Page_Load);

in InitializeComponent()
 
It's in there. Shouldn't I be able to get diagnostics written to the
screen if I write something like:

Response.Write("there");

I have this line in the InitializeComponent() method, but that doesn't
seem to be firing either. If so, I would think I'd get a "there"
written somewhere on my screen.
 
Back
Top