I am getting this in ASP.NET 4 webforms. Now I know the user sends HTML in the textbox. my problem is that I want to alert him that he entered HTML and invalid content.
How can I do that?
Thanks
I am getting this in ASP.NET 4 webforms. Now I know the user sends HTML in the textbox. my problem is that I want to alert him that he entered HTML and invalid content.
How can I do that?
Thanks
Setting validateRequest="false"
will avoid this error, but it will leave the page vulnerable to a number of attacks which may be sql injection attacks also.
Or use HTMLEncode
on all fields where you are taking input.
For more detailed explanation have a look at following Stackoverflow question
about handling suspicious content:
A potentially dangerous Request.Form value was detected from the client
Hope this helps.
I recomend to Parse the HTML Content entered by the user in your browser.