This documentation is archived and is not being maintained.

ClientScriptManager::RegisterHiddenField Method

Registers a hidden value with the Page object.

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

public:
void RegisterHiddenField(
	String^ hiddenFieldName, 
	String^ hiddenFieldInitialValue
)

Parameters

hiddenFieldName
Type: System::String
The name of the hidden field to register.
hiddenFieldInitialValue
Type: System::String
The initial value of the field to register.

ExceptionCondition
ArgumentNullException

hiddenFieldName is nullptr.

The RegisterHiddenField method creates a hidden <input> element on the rendered HTML page.

The following code example demonstrates the use of the RegisterArrayDeclaration and RegisterHiddenField methods. The example registers an array and a hidden value and defines the OnClick event of an <input> button to calculate the sum of two values of the array and the hidden value.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: