L
lisa
I've built my tab control, and it works great. Except for one problem.
Any controls which are contained in any of the tabs lose state. The
tab control itself retains state. Any content added does not.
I tried putting a checkbox control inside of one of the tabs and
outside of the tab control. I checked them both in run time and then
triggered a postback. The checkbox outside of the tab control was
still checked. The checkbox inside the tab control was not.
I tried adding this to OnInit:
For Each myTab As Tab In Tabs
For Each myControl As Control In myTab.Controls
myControl.TrackViewState()
Next
Next
This was the result:
'System.Web.UI.Control.Protected Overridable Sub TrackViewState()' is
not accessible in this context because it is 'Protected'.
I have ViewStateEnabled set explicitly to True on both checkboxes. Is
there anything I can do to get the content to retain state?
Thanks,
Lisa
Any controls which are contained in any of the tabs lose state. The
tab control itself retains state. Any content added does not.
I tried putting a checkbox control inside of one of the tabs and
outside of the tab control. I checked them both in run time and then
triggered a postback. The checkbox outside of the tab control was
still checked. The checkbox inside the tab control was not.
I tried adding this to OnInit:
For Each myTab As Tab In Tabs
For Each myControl As Control In myTab.Controls
myControl.TrackViewState()
Next
Next
This was the result:
'System.Web.UI.Control.Protected Overridable Sub TrackViewState()' is
not accessible in this context because it is 'Protected'.
I have ViewStateEnabled set explicitly to True on both checkboxes. Is
there anything I can do to get the content to retain state?
Thanks,
Lisa