一个内部的ValidationSummary MVC 3显示HTML [英] MVC 3 Display HTML inside a ValidationSummary

查看:106
本文介绍了一个内部的ValidationSummary MVC 3显示HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想显示验证摘要内部强大的标签,但它连接codeS它并没有正常显示。

I am trying to display a strong tag inside a validation summary but it encodes it and does not display properly.

@Html.ValidationSummary(false, "<strong>ERROR:<strong>The form is not valid!")

我怎样才能得到这个工作?

How can I get this to work?

推荐答案

正如在<一个公认的答案被建议你可以扩展在ValidationSummary帮手href=\"http://stackoverflow.com/questions/918969/how-to-extend-the-validationsummary-html-helper-in-asp-net-mvc\">this问题。

编辑:我presume输入的任何文字的编码是一项安全功能,因此一件好事

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

这篇关于一个内部的ValidationSummary MVC 3显示HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆