Name

HtmlInputHidden

Synopsis

This class represents the HTML <input type=hidden> tag, which allows you to store hidden information that will be sent with all postbacks. This technique is commonly used to store information without using cookies or session state. ASP.NET automatically uses a hidden input field to preserve the contents of server controls that have the System.Web.UI.Control.EnableViewState property set to True.

You can also react to the ServerChange event. Because the hidden input field will be changed only through code on the server, this event will fire immediately in response to changes implemented by your code.

Public Class HtmlInputHidden : Inherits HtmlInputControl : Implements_
       System.Web.UI.IPostBackDataHandler
' Public Constructors
   Public Sub New() 
' Protected Instance Methods
   Overrides Protected Sub OnPreRender(ByVal e As EventArgs) 
   Overridable Protected Sub OnServerChange(
        ByVal e As EventArgs) 
' Events
   Public Event ServerChange As EventHandler  
End Class

Hierarchy

System.Object System.Web.UI.Control(System.ComponentModel.IComponent, System.IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor)HtmlControl(System.Web.UI.IAttributeAccessor)HtmlInputControl HtmlInputHidden(System.Web.UI.IPostBackDataHandler)

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.