HtmlForm::UniqueID Property
Gets the unique programmatic identifier assigned to the HtmlForm control.
Assembly: System.Web (in System.Web.dll)
Use the UniqueID property to get the unique programmatic identifier assigned to the HtmlForm control. This property overrides the base implementation to return a constant value when the control is contained in an INamingContainer-implemented object other than a page, such as a custom server control. If the naming container is a page, the value of the HtmlForm control's ID property is returned.
The UniqueID property and the Name property always return the same value. This is useful when the HtmlForm control is rendered on a browser that requires the HtmlForm control's UniqueID and Name properties to be the same. To keep these properties synchronized, the Name property always returns the value of the UniqueID property.
Note |
|---|
The name attribute is not an XHTML-compliant attribute and by default is not rendered by ASP.NET. |
Available since 1.1
