如何在mvc ValidationSummary
中获取新行@Html.ValidationSummary(true, "asdfsadfsdf <br> sdfsdsddsfdfsdsf")
I want a new line instead of <br> in the output message
答案 0 :(得分:3)
@if (!ViewData.ModelState.IsValid) {
<div>
@Html.Raw(HttpUtility.HtmlDecode(Html.ValidationSummary(true, "asdfsadfsdf <br> sdfsdsddsfdfsdsf").ToHtmlString()))
</div>
}