HtmlHelper<TModel>.PasswordFor<TResult> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an <input> element of type "password" for the specified expression
. Adds a
"value" attribute containing the htmlAttributes
dictionary entry with key "value" (if
any).
public:
generic <typename TResult>
virtual Microsoft::AspNetCore::Html::IHtmlContent ^ PasswordFor(System::Linq::Expressions::Expression<Func<TModel, TResult> ^> ^ expression, System::Object ^ htmlAttributes);
public Microsoft.AspNetCore.Html.IHtmlContent PasswordFor<TResult> (System.Linq.Expressions.Expression<Func<TModel,TResult>> expression, object htmlAttributes);
abstract member PasswordFor : System.Linq.Expressions.Expression<Func<'Model, 'Result>> * obj -> Microsoft.AspNetCore.Html.IHtmlContent
override this.PasswordFor : System.Linq.Expressions.Expression<Func<'Model, 'Result>> * obj -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function PasswordFor(Of TResult) (expression As Expression(Of Func(Of TModel, TResult)), htmlAttributes As Object) As IHtmlContent
Type Parameters
- TResult
The type of the expression
result.
Parameters
- expression
- Expression<Func<TModel,TResult>>
An expression to be evaluated against the current model.
- htmlAttributes
- Object
An Object that contains the HTML attributes for the element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.
Returns
A new IHtmlContent containing the <input> element.