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



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

Answer / 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

More ASP.NET Interview Questions

How do you perform validations ?

2 Answers   Microsoft,


What is rich control in asp.net?

1 Answers  


Difference between overriding and overloading?

1 Answers  


All kind of access specifiers for a class and for methods ?

1 Answers   MMTS,


How to turn off cookies for a page?

1 Answers  


How do you install windows service?

4 Answers   Tech Mahindra,


How does VB.NET/C# achieve polymorphism?

6 Answers   Siebel Systems,


About Windows/Forms Authentication

1 Answers  


Is redux flux?

1 Answers  


Difference between Htttppost and Httpget Methods?

3 Answers   Infosys, Microsoft,


What is the difference between mechine.config and web.config?

1 Answers  


How many classes can a single .NET DLL contain?

6 Answers   SoftSol,


Categories