环境:VS2010
1.页头上加上ValidateRequest="false"
<%@ Page Language="C#" ValidateRequest="false" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true" CodeBehind="AddResource.aspx.cs" Inherits="AZMIS.ResourceMaintain.AddResource" Title="Add new resource..." %>
2.web.config在<system.web>节点加上<httpRuntime requestValidationMode="2.0"/>
<system.web> <httpRuntime requestValidationMode="2.0"/> </system.web>