ClientScriptManager.RegisterHiddenField Method (String, String)

 

Registers a hidden value with the Page object.

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

member RegisterHiddenField : 
        hiddenFieldName:string *
        hiddenFieldInitialValue:string -> unit

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.

Exception Condition
ArgumentNullException

hiddenFieldName is null.

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
Available since 2.0
Return to top
Show: