谁能告诉我除了 System.ComponentModel.DataAnnotations 之外还需要包含什么才能使 [AllowHtml] 被识别?当我将属性添加到属性时,它告诉我以下编译器错误:
"The type or namespace name 'AllowHtml' could not be found (are you missing a using directive or an assembly reference?)"
我需要允许 html 进入我的字段,并且在我开始工作之前无法继续。任何帮助将不胜感激!
谢谢...
最佳答案
据我所知,[AllowHtml] 属于 System.Web.Mvc 命名空间。 http://msdn.microsoft.com/en-us/library/system.web.mvc.allowhtmlattribute(v=vs.98).aspx
关于asp.net-mvc-3 - 未找到允许 Html 属性 [AllowHtml],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5455084/