在传统的.net Request验证中 ,只需要在WebConfig HttpRuntime节点 加入 RequestValidateMode 属性,值为2.0(此处2.0并非Framework版本)
在pages 或页面中将 validateRequest设为 false 即可。
但以上设置在MVC中失效。
资料:http://www.cnblogs.com/UouHt/archive/2008/10/30/1322697.html
在MVC中 设置如下:
ValidateInput
在MVC的 方法 或控制器上 加入 [ValidateInput(false)]标识就OK
资料: http://www.pageadmin.net/article/20141016/935.html