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
iOS
Java
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
7.4k
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 (1609)
Programmer (1253)
Senior Management (1222)
Sr. Developer (666)
Sr. Programmer (432)
Fresher (402)
Tech Lead (265)
DBA (245)
Team Lead (189)
Project Lead (86)
View All
MOST LIKED QUESTIONS
What are the advantages of using REST in Web API?
Why do you want to leave your current company?
A class provides a default constructor for me. I write a constructor that takes a string as...
Which Is Faster MVC or ASP.net ?
What is file extension of Webservices in .Net?
What is ASP.NET Core?
.NET interview questions :- Can you explain architecture of your project ?
In which situation(s), the use of "Delegate" is a good idea?
What is a View ?Can we insert,Update and delete a view?
What is the difference between Convert.ToString() and .ToString()?