Page.RequiresControlState Method

Determines whether the specified Control object is registered to participate in control state management.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

public bool RequiresControlState (
	Control control
public boolean RequiresControlState (
	Control control
public function RequiresControlState (
	control : Control
) : boolean
Not applicable.



The Control to check for a control state requirement.

Return Value

true if the specified Control requires control state; otherwise, false

Control state is an object composed of critical view-state data that Web server controls need to function; it is contained in a separate object from normal view state.

Custom controls using control state must call the RegisterRequiresControlState method before saving control state. Use the RequiresControlState method to check for controls that are registered with the page as requiring control state.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions