我有aspx,因为我正在使用tinymce编辑器调用ascx用户控件.当我试图保存数据时,我收到错误..
从客户端检测到一个潜在危险的Request.Form值(UserControl1 $TextBox1 =“fghfghj
我已经检查了A potentially dangerous Request.Form value was detected from the client
我试过了:
web.config我设置
<pages validateRequest="false"> <httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters=""/> <compilation debug="true" targetFramework="4.0"> <@page validateRequest="false"> Server.HtmlEncode(TextBox1.Text) encoding: "xml" // This is solving the prob. but Text is converting in HTML tag I don't want that
请有人帮帮我……
解决方法
将其添加到httpRuntime
< httpRuntime requestValidationMode="2.0" />