Thursday, October 13, 2011

Reading a Value From View State (Visual C#)


string strColor;
if (Page.IsPostBack)
{
   // Retrieve and display the property value.
   strColor = (string)ViewState["color"];
   Response.Write(strColor);
}
else
   // Save the property value.
   ViewState["color"] = "yellow";

No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

Ubuntu 26.10: What’s New in “Stonking Stingray”?

  Ubuntu 26.10: What’s New in “Stonking Stingray”? Ubuntu 26.10, codenamed Stonking Stingray , is shaping up as a solid interim release focu...