TechBubbles Microsoft Technology BLOG

View State vs Control State

Control State is another state management technique which is essentially a private view state for your control.

In order to preserve the page and control data over round trips to the web server, traditionally we are using View State. View State Property maintains information in hidden field and the data is encrypted.

If you disable the View State in your page, the custom controls which used in your page has a chance of losing their state.

To Address the above issue ASP.NET 2.0 has introduced Control State  which is private View State for the control and preserves the state of the control even when you turn off the View State.

Use the Control State property when you are developing the Custom Control by overriding the SaveControlState method to save the data in Control State.

Note that Control State Can not be disabled.

About the author

Kalyan Bandarupalli

My name is kalyan, I am a software architect and builds the applications using Microsoft .NET technologies. Here I am trying to share what I feel and what I think with whoever comes along wandering to Internet home of mine.I hope that this page and its contents will speak for me and that is the reason I am not going to say anything specially about my self here.

Add Comment

TechBubbles Microsoft Technology BLOG

Follow me

Archives

Tag Cloud