We might
have seen the ASP page life cycle, how the each event calls one after another,
After the Page_Init, Page_Load calls and then so on, Even button click event occurs
after the Page_init and Page_load, so there are some conditions where Page_load
event to be called after Button_click event. There is a piece of code below to
get called.
C# code
protected void Page_Init(object sender, EventArgs
e)
{
//code to be execute in Page_Init
}
protected void
Page_Load(object sender, EventArgs e)
{
//code to be execute in Page_Load
}
protected void
Button1_Click(object sender, EventArgs e)
{
//code for button click event
this.Page_Init(null, null); //for calling Page_Init event
this.Page_Load(null, null); //for calling Page_Load event
}