Easy - ASP.Net page life cycle

eramgarden

Contributor
Joined
Mar 8, 2004
Messages
579
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?
 
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.
 
Back
Top