Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Difference between Control's ViewState and ControlState?

Reply
Thread Tools

Difference between Control's ViewState and ControlState?

 
 
Edward
Guest
Posts: n/a
 
      05-12-2008
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.
 
Reply With Quote
 
 
 
 
Manish
Guest
Posts: n/a
 
      05-12-2008
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/fri...07/01/472.aspx

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

Regards,
Manish
www.ComponentOne.com

"Edward" wrote:

> 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.
>

 
Reply With Quote
 
 
 
 
Edward
Guest
Posts: n/a
 
      05-12-2008
Thanks.

Manish wrote:
> 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/fri...07/01/472.aspx
>
> http://msdn.microsoft.com/en-us/library/1whwt1k7.aspx
>
> Regards,
> Manish
> www.ComponentOne.com
>
> "Edward" wrote:
>
>> 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.
>>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 7.17 What's the difference between dynamic and lexical (static) scoping? Between local() and my()? PerlFAQ Server Perl Misc 0 01-06-2011 05:00 PM
difference between refreshing a page, postback and viewstate Dan ASP .Net 4 05-24-2007 07:11 PM
Difference between bin and obj directories and difference between project references and dll references jakk ASP .Net 4 03-22-2005 09:23 PM
Difference between PostData and ViewState in a custom control? Henri ASP .Net 2 05-18-2004 05:04 PM
Exact difference between 'const char *' and 'char *', also diff between 'const' and 'static' Santa C Programming 1 07-17-2003 02:10 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57