Hi friends, in this article I will explain about ASP.NET ViewState example in VB.NET or C# || How to use ViewState ASP.NET || Working with ViewState in ASP.NET.
- ViewState is the mechanism that allows state values to be preserved across page postbacks.
- I already explained about state management using cookies and sessions.
- Viewstate is also the mechanism used to store the values across the page postbacks.
- Maintaining the viewstate is the default for ASP.NET web pages.
- If you don’t want to maintain the ViewState then include the directive <%@ Page EnableViewState="false" %> at the top of an .aspx page or add the attribute EnableViewState="false" to any control.