Can you programmatically store and retrieve data from ViewState?

Yes, you can programmatically store and retrieve data from ViewState in an ASP.NET application.

Example: To save the value in ViewState object
ViewState("Name") = txtName.text;

Retrieve the value from ViewState object
String strName = ViewState("Name").ToString();

Leave a Reply

Your email address will not be published. Required fields are marked *

5 × four =