C# 在asp.net中使用Tinymce会导致内部服务器错误

C# 在asp.net中使用Tinymce会导致内部服务器错误,c#,asp.net,richtextbox,C#,Asp.net,Richtextbox,我在我的网页和客户端使用Tinymce,一切正常。但是当我试图在代码中访问tinymce文本框时,页面控件不会呈现。我的意思是页面加载没有呈现。这是我的HTML代码 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RichText.aspx.cs" Inherits="TESTING.RichText" ValidateRequest="true" %> <!DOCTYPE html PUBLIC "-//

我在我的网页和客户端使用Tinymce,一切正常。但是当我试图在代码中访问tinymce文本框时,页面控件不会呈现。我的意思是页面加载没有呈现。这是我的HTML代码

 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RichText.aspx.cs" Inherits="TESTING.RichText"
ValidateRequest="true" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head runat="server">
   <title>Rich Text</title>
<script src="<%=ResolveClientUrl("~/Script/jquery-ui-1.7.1.custom.min.js") %>" type="text/javascript"></script>
<script type="text/javascript" src="Scirpt/tinymce/jscripts/tiny_mce/tiny_mce.js"> </script>
<script type="text/javascript" src="Scirpt/tinymce/jscripts/tiny_mce/InitializeRichTextBox.js"> </script>
</head>
<body>
<form id="form1" runat="server">
<div style="width: 400px">
    <div style="height: 100px; width: 100%;">
        &nbsp;</div>
    <asp:TextBox ID="TextBox1" runat="server" TextMode="multiline" CssClass="RichTextBox"
        Width="150px"></asp:TextBox>
</div>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
</form>
</body>
</html>
当我留下空文本,然后页面加载呈现,当我写东西并单击
按钮时,出现此错误
一个潜在的危险请求。从客户端检测到表单值(TextBox1=“
  • 将其添加到Web.config中

       <configuration>
        <system.web>
         <compilation debug="true" targetFramework="4.0"/>
         <httpRuntime requestValidationMode="2.0"/>
        </system.web>
       </configuration>
    
    供参考

       <configuration>
        <system.web>
         <compilation debug="true" targetFramework="4.0"/>
         <httpRuntime requestValidationMode="2.0"/>
        </system.web>
       </configuration>
    
         <%@ Page Language="C#" AutoEventWireup="true" 
         CodeFile="Default.aspx.cs" Inherits="_Default" ValidateRequest="false" %>