ASP.NET Javascript Error on Input

My ASP.NET page has an whose text input is encoded via HttpUtility.HtmlEncode();The page also contains validators such as and as well as several AJAX toolkit If the user inputs </ as the text in the textbox, a Javascript error<br />A potentially dangerous Request.Form value was detectedfrom the client (ctl00$contentPlaceHolder$ucLookup$tbxLastName="</")happens when …

via Asp.Net Developed Tutorials » Search Results » ajax:

ASP.NET Javascript Error on Input

My ASP.NET page has an whose text input is encoded via HttpUtility.HtmlEncode();
The page also contains validators such as and as well as several AJAX toolkit
If the user inputs A potentially dangerous Request.Form value was detected
from the client (ctl00$contentPlaceHolder$ucLookup$tbxLastName="</")happens when the form is submitted. I have tried adding various event handlers such as
protected void Page_PreInit(object sender, EventArgs e){}
protected void Page_Init(object sender, EventArgs e){}
protected void Page_PreLoad(object sender, EventArgs e){}and setting breakpoints but none of them are hit, leading me to believe the error only happens client-side.
How can I debug this error? Are there any hooks which allow me to intercept the user’s input and filter or encode it before it causes this issue?
……………………………………

Try checking out the suggestions in this thread: A potentially dangerous Request.Form value was detected from the client
……………………………………

For this Potentially dangerous error, you can do the following and see if it helps –
Add the line: inside the section

For more info: ASP.NET Javascript Error on Input

Asp.Net Developed Tutorials » Search Results » ajax

ASP.NET Javascript Error on Input

Share this post:

Related Posts

Leave a Comment