MVC 3 Display HTML inside a ValidationSummary

前端 未结 5 1572
遥遥无期
遥遥无期 2021-02-14 14:18

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         


        
5条回答
  •  情话喂你
    2021-02-14 14:49

    You could extend the ValidationSummary helper as has been suggested in the accepted answer on this question.

    Edit: I presume the encoding of any text entered is a security feature and therefore a good thing.

提交回复
热议问题