HtmlHelperInputExtensions.Password HtmlHelperInputExtensions.Password HtmlHelperInputExtensions.Password Method

Definition

Overloads

Password(IHtmlHelper, String) Password(IHtmlHelper, String) Password(IHtmlHelper, String)

Returns an <input> element of type "password" for the specified expression. Does not add a "value" attribute.

Password(IHtmlHelper, String, Object) Password(IHtmlHelper, String, Object) Password(IHtmlHelper, String, Object)

Returns an <input> element of type "password" for the specified expression. Adds a "value" attribute containing the value parameter if that is non-null.

Password(IHtmlHelper, String) Password(IHtmlHelper, String) Password(IHtmlHelper, String)

Returns an <input> element of type "password" for the specified expression. Does not add a "value" attribute.

public static Microsoft.AspNetCore.Html.IHtmlContent Password (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression);
static member Password : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function Password (htmlHelper As IHtmlHelper, expression As String) As IHtmlContent

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

expression
String String String

Expression name, relative to the current model.

Returns

A new IHtmlContent containing the <input> element.

Remarks

Combines HtmlFieldPrefix and expression to set <input> element's "name" attribute. Sanitizes expression to set element's "id" attribute. Sets <input> element's "value" attribute to string.Empty.

Password(IHtmlHelper, String, Object) Password(IHtmlHelper, String, Object) Password(IHtmlHelper, String, Object)

Returns an <input> element of type "password" for the specified expression. Adds a "value" attribute containing the value parameter if that is non-null.

public static Microsoft.AspNetCore.Html.IHtmlContent Password (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object value);
static member Password : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function Password (htmlHelper As IHtmlHelper, expression As String, value As Object) As IHtmlContent

Parameters

htmlHelper
IHtmlHelper IHtmlHelper IHtmlHelper

The IHtmlHelper instance this method extends.

expression
String String String

Expression name, relative to the current model.

value
Object Object Object

If non-null, value to include in the element.

Returns

A new IHtmlContent containing the <input> element.

Remarks

Combines HtmlFieldPrefix and expression to set <input> element's "name" attribute. Sanitizes expression to set element's "id" attribute.

Applies to