View State Versus Control State
ViewState is a mechanism through which Asp.Net preserve state of the controls during postback and preserve data in hidden fields. Whenever any request goes to the server the whole value that is in hidden fields decrypt using BASE64 encoding and further incrypt after server response. We can set enable viewstate property to false if we dont want viewstate.
And Control State work in the same manner as ViewState but with a big difference, we can't disable controlstate.Control state is used for storing a control's essential data that is needed on postback to enable the control to function even when view state has been disabled.
Mostly Use the Control State property when you are going to implement Custom Control by overriding the SaveControlState method to save the data in Control State
Cheers
No comments:
Post a Comment