K
Ken Varn
I have a class that I created that derives from TableRow. I have several of
my own custom properties in my class that are stored in ViewState. These
properties are retained in ViewState just fine. The problem I am having is
that the base class properties are not saved in ViewState. I cannot figure
out why. I have checked to make sure that ViewState is enabled, but it
still is not saving the base class ViewState elements. In particular, the
TableRow.Cells and all controls added to each Cell. And yes, the Cells all
have ViewStateEnabled set to true.
I decided to implement a IStateManager interface in my class and added the
following code for the IStateManager implementation. Not sure if this is
the reason why the base class ViewState is missing. Can someone please
help?
#region IStateManager Members
public new void TrackViewState()
{
base.TrackViewState();
}
public new bool IsTrackingViewState
{
get
{
return base.IsTrackingViewState;
}
}
public new object SaveViewState()
{
return base.SaveViewState();
}
public new void LoadViewState(object state)
{
base.LoadViewState(state);
}
#endregion
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------
my own custom properties in my class that are stored in ViewState. These
properties are retained in ViewState just fine. The problem I am having is
that the base class properties are not saved in ViewState. I cannot figure
out why. I have checked to make sure that ViewState is enabled, but it
still is not saving the base class ViewState elements. In particular, the
TableRow.Cells and all controls added to each Cell. And yes, the Cells all
have ViewStateEnabled set to true.
I decided to implement a IStateManager interface in my class and added the
following code for the IStateManager implementation. Not sure if this is
the reason why the base class ViewState is missing. Can someone please
help?
#region IStateManager Members
public new void TrackViewState()
{
base.TrackViewState();
}
public new bool IsTrackingViewState
{
get
{
return base.IsTrackingViewState;
}
}
public new object SaveViewState()
{
return base.SaveViewState();
}
public new void LoadViewState(object state)
{
base.LoadViewState(state);
}
#endregion
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------