错误:从客户端检测到潜在危险的Request.Form值 [英] Error: A potentially dangerous Request.Form value was detected from the client

查看:69
本文介绍了错误:从客户端检测到潜在危险的Request.Form值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正面临这个错误,因为我第一次插入文本时工作正常,但是当我尝试通过单击editbtn编辑文本然后代码将更改为编辑面板并绑定这个工作的文本(注意当我点击编辑和代码绑定文本时它将显示到文本中,因为它已存储到数据库中),当我完成编辑并点击更新后,我发现这个错误。



当用户为第一次代码插入文本时:



Hi I am facing this error as when i inserting the text for the first time its working fine but when i try to edit the text by clicking on editbtn and then the code will change the to edit panel and bind the text of this job (note when i click on edit and code binding the text it will show into text as it has been stored into database) and when i finish editing and click on update then i am finding this error.

When User Inserting texts for first time code:

  string CompInfo = AboutComptxtbx.Text;
                CompInfo = CompInfo.Replace(System.Environment.NewLine, "<br />");
//...
cmd.Parameters.AddWithValue("@EmpOvViw", CompInfo);





当用户点击编辑作业时,(将文本从数据库中的表格绑定到文本框)



When user click on To edit the job, (binding the texts from table inside database to textboxes)

string EditCompInfo = EditJobEmpOvViwtxtbx.Text;
            EditCompInfo = EditCompInfo.Replace(System.Environment.NewLine, "<br />");
//...

EditJobcmd.Parameters.AddWithValue("@EmpOvViw", EditCompInfo);



错误消息:


The error message:

A potentially dangerous Request.Form value was detected from the client (ctl00$ContentPlaceHolder1$EditJobEmpOvViwtxtbx="...rritories.<br /><br />The curr...").

推荐答案

ContentPlaceHolder1
ContentPlaceHolder1


EditJobEmpOvViwtxtbx =... rritories。< br />< br /> curr ...)。
EditJobEmpOvViwtxtbx="...rritories.<br /><br />The curr...").


I不要想,你需要在这里替换。请删除包含 br 标记的行。此外,不建议使用 br 标签。
I don't think, you need the replacing here. Please remove those lines which includes br tag. Moreover, br tags are not recommended.


这篇关于错误:从客户端检测到潜在危险的Request.Form值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆