TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Interviews
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
What is a ViewState?
By
Prabhu Raja
in
ASP.NET
on
Nov 19
2011
0
8k
1
Post Your Answer
Submit
Nov, 2011
19
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".
0
What is the difference between login Controls and Forms Authentication in ASP.NET?
Advantages and DisAdvantages of Using ViewState
Most Popular Job Functions
Developer (2376)
Programmer (1288)
Sr. Developer (826)
Sr. Programmer (449)
Fresher (398)
Tech Lead (378)
DBA (244)
Team Lead (187)
Project Lead (83)
Architect (28)
View All
MOST LIKED QUESTIONS
Why do you want to leave your current company?
What are the advantages of using REST in Web API?
What is ASP.NET Core?
How to iterate through ArrayList in jQuery?
What is the difference between TempData keep() and peek() function?
A class provides a default constructor for me. I write a constructor that takes a string as...
Can multiple catch blocks be executed in a C# program?
what is Sealed class
What were your responsibilities in your previous job ?
What Operating Systems Node.js Supports