eramgarden Posted April 24, 2006 Posted April 24, 2006 Trying to understand the ASP.Net Page Life Cycle. Reading this article: http://www.aspfree.com/c/a/ASP.NET/ASP.NET-Life-Cycle-and-Best-Practices/ Under "1. Object Initialization" section it has: However, if any of your objects are controls specified within your ASPX file, at this point the controls have no attributes or properties. It is dangerous to access them through code, as there is no guarantee of what order the control instances will be created .. My question is: Then when are the controls get their attriubes..when can they be accessed then? Quote
Administrators PlausiblyDamp Posted April 25, 2006 Administrators Posted April 25, 2006 After the init event has completed the controls etc have been created and can be safely accessed. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
eramgarden Posted April 25, 2006 Author Posted April 25, 2006 but in what event?..in page_load?? Quote
Administrators PlausiblyDamp Posted April 25, 2006 Administrators Posted April 25, 2006 Definately by Page_Load or if you are inheriting from a page then any of the other events that occur after Init like LoadViewState. The link you gave pretty much lists the events and explains what is happening at each step of the way. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.