错误:从客户端检测到潜在危险的Request.Form值

编程入门 行业动态 更新时间:2024-10-26 16:32:56
本文介绍了错误:从客户端检测到潜在危险的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值

本文发布于:2023-11-12 05:12:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580603.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:检测到   客户端   危险   错误   Form

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!