Can someone please tell me when the ViewState is loaded? My
understanding, based on
http://msdn.microsoft.com/library/de...nLifecycle.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(objec t sender, System.EventArg s e)
{
if (Page.IsPostBac k & ViewState["CurrentTab "] != null)
{
_currentTab = (PageTabs)ViewS tate["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.IsPostBac k=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/de...nLifecycle.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(objec t sender, System.EventArg s e)
{
if (Page.IsPostBac k & ViewState["CurrentTab "] != null)
{
_currentTab = (PageTabs)ViewS tate["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.IsPostBac k=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
Comment