提交查询时,报错显示"从客户端检测到有潜在危险的Request.Form 值"(.Net Framework1.1)的解决方案:
1、web.config文件<system.web>后面加入这一句: <pages validateRequest="false"/>
示例:
<?xml version="1.0" encoding="gb2312" ?>
<configuration>
<system.web>
<pages validateRequest="false"/>
</system.web>
</configuration>
2、在*.aspx文件头的Page中加入validateRequest="false",示例如下:
<%@ Page validateRequest="false" language="c#" Codebehind="index.aspx.cs" AutoEventWireup="false" Inherits="MyBBS.WebForm1" %>
本文地址:http://com.8s8s.com/it/it7985.htm