F
Frank
Can someone please tell me when the ViewState is loaded? My
understanding, based on
http://msdn.microsoft.com/library/d...guide/html/cpconControlExecutionLifecycle.asp
is that it should be loaded before the Page_Load event, however, given
the following code I don't get the expected results.
private void Page_Load(object sender, System.EventArgs e)
{
if (Page.IsPostBack & ViewState["CurrentTab"] != null)
{
_currentTab = (PageTabs)ViewState["CurrentTab"];
}
paintTabStrips();
}
The ViewState is set during the first call to the page. And just to be
sure of it, when I step through this code on the first iteration
(Page.IsPostBack=false) the value is in the ViewState, however on
PostBacks it is not there!!! AAARRRRGGGHHH!!!!!
Am I missing something fundamental or is it just my mind that has gone
lost?
Thanks
understanding, based on
http://msdn.microsoft.com/library/d...guide/html/cpconControlExecutionLifecycle.asp
is that it should be loaded before the Page_Load event, however, given
the following code I don't get the expected results.
private void Page_Load(object sender, System.EventArgs e)
{
if (Page.IsPostBack & ViewState["CurrentTab"] != null)
{
_currentTab = (PageTabs)ViewState["CurrentTab"];
}
paintTabStrips();
}
The ViewState is set during the first call to the page. And just to be
sure of it, when I step through this code on the first iteration
(Page.IsPostBack=false) the value is in the ViewState, however on
PostBacks it is not there!!! AAARRRRGGGHHH!!!!!
Am I missing something fundamental or is it just my mind that has gone
lost?
Thanks