I am trying to display a strong tag inside a validation summary but it encodes it and does not display properly.
@Html.ValidationSummary(false, \"E
I've find this :
public static MvcHtmlString ToMvcHtmlString(this MvcHtmlString htmlString)
{
if (htmlString != null)
{
return new MvcHtmlString(HttpUtility.HtmlDecode(htmlString.ToString()));
}
return null;
}
and then :
@Html.ValidationSummary(false, "ERROR:The form is not valid!").ToMvcHtmlString()