在ASP.NET 1.1中,以前大家得自己实现模板页,ASP.NET 2.0里内建了模板页技术——Master Page。
如果要在 Master Page 和 Content Page 里有些交互过程,则要注意它们的事件触发顺序如下:
Master page controls Init event.
Content controls Init event.
Master page Init event.
Content page Init event.
Content page Load event.
Master page Load event.
Content controls Load event.
Content page PreRender event.
Master page PreRender event.
Master page controls PreRender event.
Content controls PreRender event.