ASP.NET 页面事件执行顺序
1 public partial class _Default : System.Web.UI.Page
2 {
3 protected void Page_PreLoad(object sender, EventArgs e)
4 {
5 int a = 9;
6 }
7
8 protected void Page_Load(object sender, EventArgs e)
9 {
10 int a = 9;
11 }
12
13 protected void Page_Unload(object sender, EventArgs e)
14 {
15 int a = 9;
16 }
17 }
2 {
3 protected void Page_PreLoad(object sender, EventArgs e)
4 {
5 int a = 9;
6 }
7
8 protected void Page_Load(object sender, EventArgs e)
9 {
10 int a = 9;
11 }
12
13 protected void Page_Unload(object sender, EventArgs e)
14 {
15 int a = 9;
16 }
17 }