A potentially dangerous Request.Form value was detected from the client

A potentially dangerous Request.Form value was detected from the client

由于在.net中,Request时出现有HTML或Javascript等字符串时,系统会认为是危险性值。立马报错。

解决方案一:
在.aspx文件头中加入这句:
<%@ Page validateRequest="false"  %>

解决方案二:
修改web.config文件:

 
   
 

因为validateRequest默认值为true。只要设为false即可。

转载于:https://www.cnblogs.com/xiaodi/archive/2006/04/27/386414.html

你可能感兴趣的:(A potentially dangerous Request.Form value was detected from the client)