Export (0) Print
Expand All

HtmlHelper.Password Method (String, Object)

Returns an HTML password control that has the specified name and value.

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

public IHtmlString Password(
	string name,
	Object value
)

Parameters

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

Return Value

Type: IHtmlString
The HTML markup that represents the password control.

ExceptionCondition
ArgumentException

name is null or empty.

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

<input type="password" name="name" value="value" />

  • Medium trust for the immediate caller. This member can be used by partially trusted code.
Show:
© 2014 Microsoft