FreeTextBox3.1.6中如何解决“检测到有潜在危险的 Request.Form 值”错误提示
2007-05-14 16:26
393 查看
在用FreeTextBox3.1.6的时候,如果我们将其Text值postback回去的时候,会出现上面标题所说的那个问题
下面就说说我的解决办法。
方法一:
1、打开FTB的客户端文件aspnet_client/FreeTextBox/FTB-FreeTextBox.js。
2、找到方法FTB_FreeTextBox.prototype.CopyDesignToHtml = function(){...};
3、将语句
this.htmlEditor.value = html;
改为
this.htmlEditor.value = this.HtmlEncode(html);
4、每次将在 Page_Load(object sender,eventArgs e) 方法中。将 FreeTextBox1.Text的值改为
this.FreeTextBox1.Text = HttpUtility.HtmlDecode(this.FreeTextBox1.Text);
---------------
注 :为什么一定要第4步? 因为我们客户端将其值给HtmlEncode啦,所以要还原它原始的html页面效果。
---------------
方法二:
把包含FTB的page 中的 ValidateRequest 置 "false"。
方法三:
前三步和方法类似,第四步改为反编译FTB代码,
把
[Description("Contains the HTML for the editor."), Category("Output")]
public string Text
{
get
{
object obj1 = this.ViewState["Text"];
return ((obj1 == null) ? "" : (string)obj1);
}
set
{
this.ViewState["Text"] = value;
}
}
改为
[Description("Contains the HTML for the editor."), Category("Output")]
public string Text
{
get
{
object obj1 = this.ViewState["Text"];
return ((obj1 == null) ? "" : HttpUtility.HtmlDecode((string) obj1));
}
set
{
this.ViewState["Text"] = value;
}
}
http://www.cnblogs.com/3zfp/archive/2007/01/20/625695.html
下面就说说我的解决办法。
方法一:
1、打开FTB的客户端文件aspnet_client/FreeTextBox/FTB-FreeTextBox.js。
2、找到方法FTB_FreeTextBox.prototype.CopyDesignToHtml = function(){...};
3、将语句
this.htmlEditor.value = html;
改为
this.htmlEditor.value = this.HtmlEncode(html);
4、每次将在 Page_Load(object sender,eventArgs e) 方法中。将 FreeTextBox1.Text的值改为
this.FreeTextBox1.Text = HttpUtility.HtmlDecode(this.FreeTextBox1.Text);
---------------
注 :为什么一定要第4步? 因为我们客户端将其值给HtmlEncode啦,所以要还原它原始的html页面效果。
---------------
方法二:
把包含FTB的page 中的 ValidateRequest 置 "false"。
方法三:
前三步和方法类似,第四步改为反编译FTB代码,
把
[Description("Contains the HTML for the editor."), Category("Output")]
public string Text
{
get
{
object obj1 = this.ViewState["Text"];
return ((obj1 == null) ? "" : (string)obj1);
}
set
{
this.ViewState["Text"] = value;
}
}
改为
[Description("Contains the HTML for the editor."), Category("Output")]
public string Text
{
get
{
object obj1 = this.ViewState["Text"];
return ((obj1 == null) ? "" : HttpUtility.HtmlDecode((string) obj1));
}
set
{
this.ViewState["Text"] = value;
}
}
http://www.cnblogs.com/3zfp/archive/2007/01/20/625695.html
相关文章推荐
- MVC中提示错误:从客户端中检测到有潜在危险的 Request.Form 值的详细解决方法
- MVC中提示错误:从客户端中检测到有潜在危险的 Request.Form 值的详细解决方法
- 解决asp.net中“从客户端(......)中检测到有潜在危险的 Request.Form 值。”错误
- 错误提示 从客户端(Content="<br>测试")中检测到有潜在危险的 Request.Form 值。
- iwms后台出现从客户端(ctl00$cphMain$logo="<img src="pic/logo.g...")中检测到有潜在危险的 Request.Form 值。错误解决方法
- 从客户端中检测到有潜在危险的 Request.Form 值错误解决方法
- 使用Asp.net MVC 2.0 +.NET 4.0 出现 “从客户端 ... 中检测到有潜在危险的 Request.Form 值”错误的解决办法
- iwms后台出现从客户端(ctl00$cphMain$logo="<img src="pic/logo.g...")中检测到有潜在危险的 Request.Form 值。错误解决方法
- 出现从客户端中检测到有潜在危险的 Request.Form 值的错误时的解决办法
- 遇到“从客户端检测到有潜在危险的Request.Form 值”错误提示
- 出现从客户端中检测到有潜在危险的 Request.Form 值的错误时的解决办法
- “检测到有潜在危险的 Request.Form 值.”这个错误提示
- 从客户端中检测到有潜在危险的 Request.Form 值的错误解决办法
- 从客户端检测到有潜在危险的Request.Form 值”错误提示
- 检测到有潜在危险的 Request.Form 值错误解决办法
- 出现从客户端中检测到有潜在危险的 Request.Form 值的错误时的解决办法
- .net中“检测到有潜在危险的 Request.Form 值”错误解决方法
- 安全简单解决MVC 提示 检测到有潜在危险的 Request.Form 值.
- 解决asp.net中“从客户端(......)中检测到有潜在危险的 Request.Form 值。”错误
- 从客户端中检测到有潜在危险的 Request.Form 值错误解决方法