What is ViewState? How is it encoded? Is it encrypted? Who uses ViewState ?

Answer Posted / nikhiul saxena

ViewState is the mechanism ASP.NET uses to keep track of server control state values that don't otherwise post back as part of the HTTP form. ViewState Maintains the UI State of a Page
ViewState is base64-encoded.
It is not encrypted but it can be encrypted by setting EnableViewStatMAC="true" & setting the machineKey validation type to 3DES. If you want to NOT maintain the ViewState, include the directive < %@ Page EnableViewState="false" % > at the top of an .aspx page or add the attribute EnableViewState="false" to any control.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is viewstate? What does the “enableviewstate” property do?

510


What is difference between asp state management and asp.net state management? How can we pass info between 2 asp.net pages?

487


How does asp page work?

536


What is web api vs wcf?

574


What is the difference between a default skin and a named skin?

580






What are httphandlers and httpmodules and difference between them?

514


What is postback and autopostback in asp.net?

521


What is meant by web application?

535


How can exception be handled with out the use of try catch?

535


Can a .net web application consume java web service?

504


Mention the namespace that is used to include .net data provider for sql server in .net code?

496


Which ASP.NET configuration options are supported in the ASP.NET implementation on the shared web hosting platform?

646


Why is global asax is used?

604


What's the use of response.output.write()?

756


How does http session work?

516