On a web form I have a text box and when someone enters html tags in the text box, it throws the infamous exception:
One "fix" is to set ValidateRequest to false in the page or config file, but I am not really interested in opening up my code to scripting attacks. The best approach would be to disallow html tags from text boxes.
What are some other approaches?
System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client
One "fix" is to set ValidateRequest to false in the page or config file, but I am not really interested in opening up my code to scripting attacks. The best approach would be to disallow html tags from text boxes.
What are some other approaches?