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" %>