R
Redhairs
I created two base page class and a webform to inherit them as blow.
Public Class BasePage:System.Web.UI.Page
{
protected override void OnPreInit(EventArgs e)
{ base.OnPreInit(e); }
}
Public Class ContentPage : BasePage
{
protected override void OnPreInit(EventArgs e)
{ base.OnPreInit(e); }
}
WebForm.aspx inherit theContentPage class
Then the event execution order is the Page_PreInit() ->
BasePage.OnPreInit() -> ContentPage.OnPreInit()
How to change the execution sequence as below?
(1) ContentPage.OnPreInit()
(2) BasePage.OnPreInit()
(3) Page_PreInit()
Public Class BasePage:System.Web.UI.Page
{
protected override void OnPreInit(EventArgs e)
{ base.OnPreInit(e); }
}
Public Class ContentPage : BasePage
{
protected override void OnPreInit(EventArgs e)
{ base.OnPreInit(e); }
}
WebForm.aspx inherit theContentPage class
Then the event execution order is the Page_PreInit() ->
BasePage.OnPreInit() -> ContentPage.OnPreInit()
How to change the execution sequence as below?
(1) ContentPage.OnPreInit()
(2) BasePage.OnPreInit()
(3) Page_PreInit()