System.Web.UI.HtmlControls.HtmlInputHidden Class

Allows programmatic access to the HTML <input type=hidden> element on the server.

See Also: HtmlInputHidden Members

Syntax

[System.Web.UI.SupportsEventValidation]
[System.ComponentModel.DefaultEvent("ServerChange")]
public class HtmlInputHidden : HtmlInputControl, System.Web.UI.IPostBackDataHandler

Remarks

You can use the System.Web.UI.HtmlControls.HtmlInputHidden control to embed information that is hidden from the user within a <form> element. This information is sent when the Web page is posted back to the server. The System.Web.UI.HtmlControls.HtmlInputHidden control provides a HtmlInputHidden.ServerChange event that is raised when the HtmlInputControl.Value property changes values between posts to the server. This allows you to create an event handler that performs a custom set of instructions each time the event is raised.

Note:

The System.Web.UI.HtmlControls.HtmlInputHidden control does not provide a built-in way to post back to the server. You must provide another control on the Web page that supports posting to the server, such as an System.Web.UI.HtmlControls.HtmlButton control, to send the value of the control back to the server.

Note:

The ASP.NET page framework uses this HTML feature to automatically load and persist the view state of server controls on a page.

For a list of initial property values for an instance of System.Web.UI.HtmlControls.HtmlInputHidden, see the HtmlInputHidden.#ctor constructor.

Requirements

Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0