HtmlHelperExtensions.DisplayFor<TModel, TValue> Method (HtmlHelper<TModel>, Expression<Func<TModel, TValue>>, String, String)
Namespace: Microsoft.Web.Mvc.Html
Assembly: Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)
Syntax
public static MvcHtmlString DisplayFor<TModel, TValue>(
this HtmlHelper<TModel> htmlHelper,
Expression<Func<TModel, TValue>> expression,
string templateName = null,
string htmlFieldName = null
)
public:
generic<typename TModel, typename TValue>
[ExtensionAttribute]
static MvcHtmlString^ DisplayFor(
HtmlHelper<TModel>^ htmlHelper,
Expression<Func<TModel, TValue>^>^ expression,
String^ templateName = null,
String^ htmlFieldName = null
)
static member DisplayFor<'TModel, 'TValue> :
htmlHelper:HtmlHelper<'TModel> *
expression:Expression<Func<'TModel, 'TValue>> *
templateName:string = null *
htmlFieldName:string = null -> MvcHtmlString
<ExtensionAttribute>
Public Shared Function DisplayFor(Of TModel, TValue) (
htmlHelper As HtmlHelper(Of TModel),
expression As Expression(Of Func(Of TModel, TValue)),
templateName As String,
htmlFieldName As String
) As MvcHtmlString
Parameters
- htmlHelper
Type: System.Web.Mvc.HtmlHelper<TModel>
- expression
Type: System.Linq.Expressions.Expression<Func<TModel, TValue>>
- templateName
Type: System.String
- htmlFieldName
Type: System.String
Return Value
Type: System.Web.Mvc.MvcHtmlString
Type Parameters
- TModel
- TValue
See Also
HtmlHelperExtensions Class
Microsoft.Web.Mvc.Html Namespace
Return to top