Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
1
Reply
What is a ViewState?
Prabhu Raja
13y
7.4k
0
Reply
Submit
If a site happens to not maintain a ViewState, then if a user has entered some information in a large form with many input fields and the page is refreshes, then the values filled up in the form are lost.
The same situation can also occur on submitting the form. If the validations return an error, the user has to refill the form.
Thus, submitting a form clears up all form values as the site does not maintain any state called ViewState.
In ASP .NET, the ViewState of a form is maintained with a built-in state management technique keeps the state of the controls during subsequent postbacks by a particular user.
The ViewState indicates the status of the page when submitted to the server. The status is defined through a hidden field placed on each page with a
control.
The ViewState option can be disabled by including the directive <%@ Page EnableViewState="false"%> at the top of an .aspx page
If a ViewState of a certain control has to be disabled, then set EnableViewState="false".
Prabhu Raja
13y
0
What is the difference between login Controls and Forms Authentication in ASP.NET?
Advantages and DisAdvantages of Using ViewState
Message