“检测到有潜在危险的 Request.Form 值”的解决方法

bug描述:
    从客户端(Control_Message_SendBox1:dgrdSendBox:_ctl3:_ctl1="<div id="de" onclick...")中检测到有潜在危险的 Request.Form 值。
解决办法:
 1)修改<pages>标签,加上validateRequest="fasle".(  <pages validateRequest="false" />)
 2)出问题的输入框 进行HTML编码 比如我用了FCKeditor文本编辑器遇到了这样问题,后台在取FCKeditor值时可以这样写
Server.HtmlEncode(FCKeditor1.Value)
3)Web.Config中加入

<configuration>

<system.web>

<httpRuntime requestValidationMode="2.0"/>

</system.web>

</configuration>

原文地址:https://www.cnblogs.com/zhangronghua/p/1015458.html