473,396 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Difference between Control's ViewState and ControlState?

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.
Jun 27 '08 #1
2 5582
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.
Jun 27 '08 #2
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.
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
5
by: Nathan Sokalski | last post by:
I have a user control that contains three variables which are accessed through public properties. They are declared immediately below the "Web Form Designer Generated Code" section. Every time an...
1
by: John | last post by:
I'm having problems controlling viewstate size in ASP.NET 2.0. I have a repeater, which contains a gridview, which contains another gridview. All this is databound to produce a 100page report...
0
by: Pavan | last post by:
My name is Pavan and I am a software engineer working on ASP .Net web development. Currently I am using .Net 2.0 Professional Edition to develop my web pages. I have a problem
3
by: Carlos Lozano | last post by:
Hello, I am having a problem getting the selectedValue from a dropdownlist that is populated with a dataReader and just can't see the problem. I did the following: dim dr as DataReader dr...
5
by: Mark Olbert | last post by:
Tonight's episode of me beating my head bloody against the monitor was the result of ViewState/ControlState information not being available when CreateChildControls() gets called for a...
12
by: Eric Layman | last post by:
Hi, What's the difference between a normal web element: <input type="text" id="txtname" name="txtname" runat="server"> vs webcontrol text box: <asp:Textbox id="username" Columns="10"...
1
by: jelle.huygen | last post by:
Hello, I have a problem in ASP.NET 2.0 with the viewstate of my dynamically added user control. I have reproduced the problem with a very simple user control and a very simple page. On my...
2
by: Vijay | last post by:
Hi, I am working on an Asp.net 2.0 web application that uses master pages, according to our application architecture we should not use Viewstate. Is there a work around to raise the events fired...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.