Gets or sets an object that represents the data that controls contained by the current Page object use to persist across HTTP requests to the Web server.
Assembly: System.Web (in System.Web.dll)
Control state is an object comprised of critical view state data that Web server controls need to function, and is contained in a separate object from normal view state information. Control state data is not affected when view state is disabled at the Page level, but requires extra implementation steps to use. For more information on using the ViewState property and control state when developing controls, see Developing Custom ASP.NET Server Controls.
The following code example demonstrates how a class that derives from the PageStatePersister class initializes the property. In this example, the property has been assigned to the Second field of a Pair object, and serialized using the ObjectStateFormatter class. When the Load method is called, the ObjectStateFormatter class is used to deserialize view state and control state information, and the property is initialized from the resulting Pair object's Second field. This code example is part of a larger example provided for the PageStatePersister class.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.