开发者

In ASP.net Page life cycle on which state Controls is accessible?

In an ASP.net page life 开发者_JS百科cycle, on which state are controls accessible? According to me it is after Initialize, is that correct?


I think you are correct.

This is from MSDN:

Init - Raised after all controls have been initialized and any skin settings have been applied. The Init event of individual controls occurs before the Init event of the page. Use this event to read or initialize control properties.

You may check this link for more details: ASP.NET Page Life Cycle Overview


It depends on what you mean by accessible. You will usually want to access the controls sometime between OnInit and OnLoad.

Here's a great guide that explains the page lifecylce, and when to use each event:

http://www.altafkhatri.com/Technical/ASP_NET_Page_Life_Cycle_And_Events/Common_ASP_NET/Page_Events


Initialization, check this out: http://msdn.microsoft.com/en-us/library/ms178472.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜