asp.net中request中出现html或javascript时,系统会认为是危险的request.form value,马上报错:
A potentially dangerous Request.Form value was detected from the client.
A potentially dangerous Request.Form value was detected from the client.
解决方法一:
在web.config中添加。
<configuration>
<system.web>
<pages validateRequest="false" />
</system.web>
</configuration>
解决方法二:
在aspx文件头部加<%@ Page validateRequest="false" %>