页面生命周期 [英] page life cycle

查看:75
本文介绍了页面生命周期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的页面上有一个用户控件,而且此页面包含MasterPage.

有人可以告诉我在请求此页面时触发的事件序列吗?

I have one user control on my page and also this page contains MasterPage.

Can anybody tell me the sequence of events which fire upon requesting this page?

推荐答案

您必须知道页面生命周期事件.
Init和Unload事件从最内部的控件开始触发,而其他事件从Page触发到内部控件依次触发.

所以你的情况,

对于init和unload,首先将触发您的master和control事件,第一页将被触发.

对于其余事件,请先显示首页,然后是控制和母版页
You must be knowing the page life cycle events.

Init and Unload events starts firing from the innermost control.While other events get fired from Page to control then innercontrol and so on.

So in your case,

for init and unload, first your master and control event will be fired the page one will be fired.

for rest of events, first page and then control and master page


这篇关于页面生命周期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆