Page::RegisterHiddenField Method (String^, String^)
Assembly: System.Web (in System.Web.dll)
public: [ObsoleteAttribute("The recommended alternative is ClientScript.RegisterHiddenField(string hiddenFieldName, string hiddenFieldInitialValue). http://go.microsoft.com/fwlink/?linkid=14202")] virtual void RegisterHiddenField( String^ hiddenFieldName, String^ hiddenFieldInitialValue )
The following code example uses the myHiddenField and its value is set to "Welcome to Microsoft!" The RegisterStartupScript method calls the myHiddenField value when the user clicks a button on the page.method to help create ECMAScript code that is passed to the requesting browser. The name of the hidden field is set to
This example has a hidden field, which is a potential security threat. By default, you should validate the value of a hidden field as you would the value of a text box. ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.
Available since 1.1