R
rn5a
In the article titled "ASP.NET Page Life Cycle Overview" at
http://msdn2.microsoft.com/en-us/library/ms178472.aspx, under the
topic "Life-cycle Events", for the Page Event named PreInit, it is
stated that
-------------------------------------
If the request is a postback, the values of the controls have not yet
been restored from view state. If you set a control property at this
stage, its value might be overwritten in the next event.
-------------------------------------
Can someone please explain me the first sentence with a small code
sample (maybe using just a TextBox & a Button)?
Also if a control property is set during PreInit, then upon postback,
its value will ALWAYS be overwritten in the next event rather than
MIGHT be overwritten in the next event (as stated in the second
sentence), isn't it?
Thanks
http://msdn2.microsoft.com/en-us/library/ms178472.aspx, under the
topic "Life-cycle Events", for the Page Event named PreInit, it is
stated that
-------------------------------------
If the request is a postback, the values of the controls have not yet
been restored from view state. If you set a control property at this
stage, its value might be overwritten in the next event.
-------------------------------------
Can someone please explain me the first sentence with a small code
sample (maybe using just a TextBox & a Button)?
Also if a control property is set during PreInit, then upon postback,
its value will ALWAYS be overwritten in the next event rather than
MIGHT be overwritten in the next event (as stated in the second
sentence), isn't it?
Thanks