Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Difference between Control's ViewState and ControlState?

0 views
Skip to first unread message

Edward

unread,
May 12, 2008, 2:00:21 AM5/12/08
to
I am reading MSDN doc about Control's ViewState and ControlState. I got
myself quite puzzled. I see that the Control class has four virtual
functions:

LoadControlState
LoadViewState
SaveControlState
SaveViewState

But a Control has only ViewState property but no ControlState.

Can anyone clarify on the difference between Control's ViewState and
ControlStae?

Thanks.

Manish

unread,
May 12, 2008, 5:52:00 AM5/12/08
to
Hi,

you can refer to following two links for detailed information about the
Control state and ViewState of the control. You can disable the Viewstate of
the control but not the Controlstate. controlstate is also stored in the
Hidden Field in HTML under_viewstate.

Behavioral state for a control should be kept in control state, and UI state
(its contents) should be kept in view state.

http://www.pluralsight.com/blogs/fritz/archive/2004/07/01/472.aspx

http://msdn.microsoft.com/en-us/library/1whwt1k7.aspx

Regards,
Manish
www.ComponentOne.com

Edward

unread,
May 12, 2008, 10:29:53 AM5/12/08
to
Thanks.
0 new messages