Login
Register
All Activity
Questions
Unanswered
Tags
Users
Ask a Question
About Us
986
Questions
785
Answers
Interview Preparation mode
beta
Funny Facebook Status
Enter your email address
All categories
SQL Server Interview Questions and Answers
(197)
SSIS Interview Questions and Answers
(54)
SSRS Interview Questions and Answers
(9)
SSAS Interview Questions and Answers
(29)
.NET Interview Questions and Answers
(186)
Oracle Interview Questions and Answers
(122)
Java Interview Questions and Answers
(32)
UNIX Interview Questions and Answers
(47)
Networking Interview Questions and Answers
(17)
MySQL Interview Questions and Answers
(30)
HR Interview Questions and Answers
(237)
General Interview Questions and Answers
(9)
Other Interview Questions and Answers
(8)
Job Openings
(3)
Greenplum Database Interview Questions and Answers
(5)
What is a ViewState?
Nice?
Vote!
asked
1 year
ago
in
.NET Interview Questions and Answers
by
KrishnaMachiraju
(
7,980
points)
asp-net
net-interview-question
1 Answer
Nice?
Vote!
* 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 <form runat=\"\"server\"\"> control.
<input type=\"\"hidden\"\" name=\"\"__VIEWSTATE\"\" value=\"\"CareerRide\"\">
* 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\"\".
answered
1 year
ago
by
KrishnaMachiraju
(
7,980
points)
Related questions
Nice?
Vote!
1
answer
What is ViewState? Explain its benefits and limitations.
asked
1 year
ago
in
.NET Interview Questions and Answers
by
KrishnaMachiraju
(
7,980
points)
asp-net
net-interview-question
Nice?
Vote!
1
answer
Why is \"Connecting to SQL Server using Integrated Security\" considered a best practice?
asked
1 year
ago
in
.NET Interview Questions and Answers
by
KrishnaMachiraju
(
7,980
points)
asp-net
net-interview-question
Nice?
Vote!
1
answer
What are the best practices to keep in mind when accepting user input on a web application?
asked
1 year
ago
in
.NET Interview Questions and Answers
by
KrishnaMachiraju
(
7,980
points)
asp-net
net-interview-question
Nice?
Vote!
1
answer
What is an application domain?
asked
1 year
ago
in
.NET Interview Questions and Answers
by
KrishnaMachiraju
(
7,980
points)
asp-net
net-interview-question
Nice?
Vote!
1
answer
What is the Pre-Compilation feature of ASP.NET 2.0?
asked
1 year
ago
in
.NET Interview Questions and Answers
by
KrishnaMachiraju
(
7,980
points)
asp-net
net-interview-question