Usercontrol Page_Load not firing.

  • Thread starter Thread starter Sosh
  • Start date Start date
S

Sosh

Hi,

Could anybody suggest a reason why the Page_Load method is not happening
in a dynamically loaded user control? (All of the content from the ascx
is being displayed though).

Thanks
 
Is the Event wired up?

Go to designer of the ascx, in the property pane select the control, click
the actions tab (lightning thumb) and see if Load has a method defined.

Good luck!

Jason Lind
 
Yes:

private void InitializeComponent()
{
this.Load += new System.EventHandler
(this.Page_Load);
}

I don't use the designer though - seems more trouble than it's worth to
me.
 

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

Back
Top