Page_LoadComplete not calling from User Control

Posted: Wednesday, January 18, 2012 in asp.net

If you add Page_LoadComplete method to a user control it’s not getting called like Page_load or Page_init. For this what you can do is call the main page’s Page_LoadComplete event from user control. Add an event handler for LoadComplete event in the user control’s page init

protected void Page_Init(object sender, EventArgs e)
{
this.Page.LoadComplete += new EventHandler(Page_LoadComplete)
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s