Share via


HtmlHelper.Hidden Method (String)

Returns an HTML hidden control that has the specified name.

Namespace:  System.Web.WebPages.Html
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)

Syntax

'Declaration
Public Function Hidden ( _
    name As String _
) As IHtmlString
'Usage
Dim instance As HtmlHelper 
Dim name As String 
Dim returnValue As IHtmlString 

returnValue = instance.Hidden(name)
public IHtmlString Hidden(
    string name
)
public:
IHtmlString^ Hidden(
    String^ name
)
member Hidden : 
        name:string -> IHtmlString
public function Hidden(
    name : String
) : IHtmlString

Parameters

  • name
    Type: System.String
    The value to assign to the name attribute of the HTML control element.

Return Value

Type: System.Web.IHtmlString
The HTML markup that represents the hidden control.

Exceptions

Exception Condition
ArgumentException

name is null reference (Nothing in Visual Basic) or empty.

Remarks

The returned markup consists of an HTML input element in the following form:

<input type="hidden" name="name" />

See Also

Reference

HtmlHelper Class

Hidden Overload

System.Web.WebPages.Html Namespace