1 protected override void Construct() {
2 base.Construct();
3 }
4 protected override void FrameworkInitialize() {
5 base.FrameworkInitialize();
6 }
7
8 protected override void InitializeCulture() {
9 base.InitializeCulture();
10 }
11
12 protected override void AddParsedSubObject(object obj) {
13 base.AddParsedSubObject(obj);
14 }
15
16 protected override ControlCollection CreateControlCollection() {
17 return base.CreateControlCollection();
18 }
19
20 protected override void AddedControl(Control control, int index) {
21 base.AddedControl(control, index);
22 }
23
24 protected override System.Collections.Specialized.NameValueCollection DeterminePostBackMode() {
25 return base.DeterminePostBackMode();
26 }
27
28 protected override void OnPreInit(EventArgs e) {
29 base.OnPreInit(e);
30 }
31
32 protected override void OnInit(EventArgs e) {
33 base.OnInit(e);
34 }
35
36 protected override void OnInitComplete(EventArgs e) {
37 base.OnInitComplete(e);
38 }
39
40 protected override void OnPreLoad(EventArgs e) {
41 base.OnPreLoad(e);
42 }
43
44 protected override void OnLoad(EventArgs e) {
45 base.OnLoad(e);
46 }
47
48 protected void Page_Load(object sender, EventArgs e) {
49 Test.Text = "PageLoad";
50
51 }
52
53 protected override void OnLoadComplete(EventArgs e) {
54 base.OnLoadComplete(e);
55 }
56
57 protected override void EnsureChildControls() {
58 base.EnsureChildControls();
59 }
60
61 protected override void CreateChildControls() {
62 base.CreateChildControls();
63 }
64
65 protected override void OnPreRender(EventArgs e) {
66 base.OnPreRender(e);
67 }
68 protected override void OnPreRenderComplete(EventArgs e) {
69 base.OnPreRenderComplete(e);
70 }
71
72 protected override object SaveViewState() {
73 return base.SaveViewState();
74 }
75
76 protected override void OnSaveStateComplete(EventArgs e) {
77 base.OnSaveStateComplete(e);
78 }
79
80 protected override HtmlTextWriter CreateHtmlTextWriter(System.IO.TextWriter tw) {
81 return base.CreateHtmlTextWriter(tw);
82 }
83
84 public override void RenderControl(HtmlTextWriter writer) {
85 base.RenderControl(writer);
86 }
87 protected override void Render(HtmlTextWriter writer) {
88 base.Render(writer);
89 }
90 protected override void RenderChildren(HtmlTextWriter writer) {
91 base.RenderChildren(writer);
92 }
93
94 protected override void OnUnload(EventArgs e) {
95 base.OnUnload(e);
96 }
2 base.Construct();
3 }
4 protected override void FrameworkInitialize() {
5 base.FrameworkInitialize();
6 }
7
8 protected override void InitializeCulture() {
9 base.InitializeCulture();
10 }
11
12 protected override void AddParsedSubObject(object obj) {
13 base.AddParsedSubObject(obj);
14 }
15
16 protected override ControlCollection CreateControlCollection() {
17 return base.CreateControlCollection();
18 }
19
20 protected override void AddedControl(Control control, int index) {
21 base.AddedControl(control, index);
22 }
23
24 protected override System.Collections.Specialized.NameValueCollection DeterminePostBackMode() {
25 return base.DeterminePostBackMode();
26 }
27
28 protected override void OnPreInit(EventArgs e) {
29 base.OnPreInit(e);
30 }
31
32 protected override void OnInit(EventArgs e) {
33 base.OnInit(e);
34 }
35
36 protected override void OnInitComplete(EventArgs e) {
37 base.OnInitComplete(e);
38 }
39
40 protected override void OnPreLoad(EventArgs e) {
41 base.OnPreLoad(e);
42 }
43
44 protected override void OnLoad(EventArgs e) {
45 base.OnLoad(e);
46 }
47
48 protected void Page_Load(object sender, EventArgs e) {
49 Test.Text = "PageLoad";
50
51 }
52
53 protected override void OnLoadComplete(EventArgs e) {
54 base.OnLoadComplete(e);
55 }
56
57 protected override void EnsureChildControls() {
58 base.EnsureChildControls();
59 }
60
61 protected override void CreateChildControls() {
62 base.CreateChildControls();
63 }
64
65 protected override void OnPreRender(EventArgs e) {
66 base.OnPreRender(e);
67 }
68 protected override void OnPreRenderComplete(EventArgs e) {
69 base.OnPreRenderComplete(e);
70 }
71
72 protected override object SaveViewState() {
73 return base.SaveViewState();
74 }
75
76 protected override void OnSaveStateComplete(EventArgs e) {
77 base.OnSaveStateComplete(e);
78 }
79
80 protected override HtmlTextWriter CreateHtmlTextWriter(System.IO.TextWriter tw) {
81 return base.CreateHtmlTextWriter(tw);
82 }
83
84 public override void RenderControl(HtmlTextWriter writer) {
85 base.RenderControl(writer);
86 }
87 protected override void Render(HtmlTextWriter writer) {
88 base.Render(writer);
89 }
90 protected override void RenderChildren(HtmlTextWriter writer) {
91 base.RenderChildren(writer);
92 }
93
94 protected override void OnUnload(EventArgs e) {
95 base.OnUnload(e);
96 }
从上面我们可以看出页面执行的顺序,当然还有几个事件没有被列出来,如LoadViewState(发生在OnInit的之后),还有几个特殊的事件我们可以如下做法来扩展程序:
1this.Unload += new System.EventHandler(this.MyPage_Unload);
2 this.Load += new System.EventHandler(this.MyPage_Load);
3 this.Init += new System.EventHandler(this.MyPage_Init);
4 this.PreRender += new System.EventHandler(this.MyPage_PreRender);
2 this.Load += new System.EventHandler(this.MyPage_Load);
3 this.Init += new System.EventHandler(this.MyPage_Init);
4 this.PreRender += new System.EventHandler(this.MyPage_PreRender);
就写到这了,郁闷的事情发生了,我写的都OK了在FireFox里居然发布出去,一不小心按一下刷新什么都没有了,郁闷阿,一篇文章写两遍,真的想气死我啊。随便记录一下,呵呵,如果有什么错误被你发现了,请不要吝惜你的键盘给我...谢谢!