ClientScriptManager.RegisterHiddenField Method (String, String)
.NET Framework (current version)
Registers a hidden value with the Page object.
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.
.NET Framework
Available since 2.0
Available since 2.0
Show: