The framework will automatically save and restore the ViewState for your web controls.
Here is an example of how to use the ViewState as a backing store for a public property on a custom web control:
[DefaultValue("")]
public string RoundTripString
{
get
{
return (ViewState["RoundTripString"] != null)
? (string) ViewState["RoundTripString"]
: string.Empty);
}
set
{
ViewState["RoundTripString"] = value;
}
}
--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Jaisabari" <Ja*******@discussions.microsoft.com> wrote in message news:22**********************************@microsof t.com...
How to save viewstate in Custom controls
--
Regards
Jaisabari