public static MvcHtmlString ValidationMessage(this HtmlHelper htmlHelper, string modelName, string validationMessage, IDictionary <string, object> htmlAttributes)
        {
            if (modelName == null)
            {
                throw new ArgumentNullException("modelName");
            }

            return(ValidationMessageHelper(htmlHelper,
                                           ModelMetadata.FromStringExpression(modelName, htmlHelper.ViewContext.ViewData),
                                           modelName,
                                           validationMessage,
                                           htmlAttributes));
        }
Esempio n. 2
0
 public static MvcHtmlString DisplayText(this HtmlHelper html, string name)
 {
     return(DisplayTextHelper(ModelMetadata.FromStringExpression(name, html.ViewData)));
 }