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