Buy Questpond's video subscriptions on
huge discount
.
Online: 1285
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Interviews
>
ASP.NET
>
Loading ...
What does the "EnableViewState" property do? Why would I want it on or off?
Posted by
Rohitshah
on 9/10/2008 | Category:
ASP.NET Interview questions
| Views: 14786
Post
|
Interview FAQs
|
Exclusive Questions
|
Interview Home
Answer:
It enables the viewstate on the page. It allows the page to save the users input on a form.
Asked In:
Many Interviews |
Alert Moderator
Bookmark It
< Previous :
Can you give an example of what might be best suit ...
Next > :
Describe the role of inetinfo.exe, aspnet_isapi.dl ...
Comments or Responses
Posted by:
Raja
on: 9/19/2008
The best answer is as follows
Enable ViewState turns on the automatic state management feature that enables server controls to re-populate their values on a round trip without requiring you to write any code. This feature is not free however, since the state of a control is passed to and from the server in a hidden form field. You should be aware of when ViewState is helping you and when it is not.
For example, if you are binding a control to data on every round trip (as in the datagrid example in tip #4), then you do not need the control to maintain it?s view state, since you will wipe out any re-populated data in any case. ViewState is enabled for all server controls by default. To disable it, set the EnableViewState property of the control to false.
Copied from: http://dev.fyicenter.com
Login to post response
More Interview Questions by Rohitshah
Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe i ...
Latest Interview Questions
What is the best way to add items from an Array into ArrayList?
Write a single line of code to create a text file and write contents i ...
Write a single line of code to read the entire content of the text fil ...
How to read entire stream contents?
How to change Database name in SQL Server?
How to sort an array into descending order?
How to convert a sentence into Title Case (Capitalize first character ...
Difference between DropDownList.Items.Add and DropDownList.Items.Inser ...
More ...