HtmlHelperInputExtensions.PasswordFor<TModel,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
. Does
not add a "value" attribute.
public:
generic <typename TModel, typename TResult>
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Html::IHtmlContent ^ PasswordFor(Microsoft::AspNetCore::Mvc::Rendering::IHtmlHelper<TModel> ^ htmlHelper, System::Linq::Expressions::Expression<Func<TModel, TResult> ^> ^ expression);
public static Microsoft.AspNetCore.Html.IHtmlContent PasswordFor<TModel,TResult> (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel> htmlHelper, System.Linq.Expressions.Expression<Func<TModel,TResult>> expression);
static member PasswordFor : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Result>> -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function PasswordFor(Of TModel, TResult) (htmlHelper As IHtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TResult))) As IHtmlContent
Type Parameters
- TModel
The type of the model.
- TResult
The type of the expression
result.
Parameters
- htmlHelper
- IHtmlHelper<TModel>
The IHtmlHelper<TModel> instance this method extends.
- expression
- Expression<Func<TModel,TResult>>
An expression to be evaluated against the current model.
Returns
A new IHtmlContent containing the <input> element.
Remarks
Combines HtmlFieldPrefix and the string representation of the expression
to set <input> element's "name" attribute. Sanitizes the string representation of the expression
to set element's "id" attribute.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for