Share via


InputExtensions.Password Method

Definition

Overloads

Password(HtmlHelper, String)

Returns a password input element by using the specified HTML helper and the name of the form field.

Password(HtmlHelper, String, Object)

Returns a password input element by using the specified HTML helper, the name of the form field, and the value.

Password(HtmlHelper, String, Object, IDictionary<String,Object>)

Returns a password input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes.

Password(HtmlHelper, String, Object, Object)

Returns a password input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes.

Password(HtmlHelper, String)

Returns a password input element by using the specified HTML helper and the name of the form field.

public static System.Web.Mvc.MvcHtmlString Password (this System.Web.Mvc.HtmlHelper htmlHelper, string name);
static member Password : System.Web.Mvc.HtmlHelper * string -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function Password (htmlHelper As HtmlHelper, name As String) As MvcHtmlString

Parameters

htmlHelper
HtmlHelper

The HTML helper instance that this method extends.

name
String

The name of the form field and the ViewDataDictionary key that is used to look up the value.

Returns

An input element whose type attribute is set to "password".

Applies to

Password(HtmlHelper, String, Object)

Returns a password input element by using the specified HTML helper, the name of the form field, and the value.

public static System.Web.Mvc.MvcHtmlString Password (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value);
static member Password : System.Web.Mvc.HtmlHelper * string * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function Password (htmlHelper As HtmlHelper, name As String, value As Object) As MvcHtmlString

Parameters

htmlHelper
HtmlHelper

The HTML helper instance that this method extends.

name
String

The name of the form field and the ViewDataDictionary key that is used to look up the value.

value
Object

The value of the password input element. If a value for this parameter is not provided, the value attribute in the html attributes is used to retrieve the value.

Returns

An input element whose type attribute is set to "password".

Applies to

Password(HtmlHelper, String, Object, IDictionary<String,Object>)

Returns a password input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes.

public static System.Web.Mvc.MvcHtmlString Password (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
static member Password : System.Web.Mvc.HtmlHelper * string * obj * System.Collections.Generic.IDictionary<string, obj> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function Password (htmlHelper As HtmlHelper, name As String, value As Object, htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString

Parameters

htmlHelper
HtmlHelper

The HTML helper instance that this method extends.

name
String

The name of the form field and the ViewDataDictionary key that is used to look up the value.

value
Object

The value of the password input element. If a value for this parameter is not provided, the value attribute in the html attributes is used to retrieve the value.

htmlAttributes
IDictionary<String,Object>

An object that contains the HTML attributes to set for the element.

Returns

An input element whose type attribute is set to "password".

Applies to

Password(HtmlHelper, String, Object, Object)

Returns a password input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes.

public static System.Web.Mvc.MvcHtmlString Password (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value, object htmlAttributes);
static member Password : System.Web.Mvc.HtmlHelper * string * obj * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function Password (htmlHelper As HtmlHelper, name As String, value As Object, htmlAttributes As Object) As MvcHtmlString

Parameters

htmlHelper
HtmlHelper

The HTML helper instance that this method extends.

name
String

The name of the form field and the ViewDataDictionary key that is used to look up the value.

value
Object

The value of the password input element. If a value for this parameter is not provided, the value attribute in the html attributes is used to retrieve the value.

htmlAttributes
Object

An object that contains the HTML attributes to set for the element.

Returns

An input element whose type attribute is set to "password".

Applies to