Users Pricing

forum

home / developersection / forums / handling an 'a potentially dangerous request.form value was detected' exception without deactivating validation

Handling an 'A potentially dangerous Request.Form value was detected' exception without deactivating validation

Anonymous User 3174 19 Dec 2014

I am creating an ASP.NET application using C# for the scripting language. When I enter HTML code into the textboxes on my webpage I get the following exception 'A potentially dangerous Request.Form value was detected', as expected. I would like to be able to catch this exception so that I can put an error message out to the user, but I can only find articles on how to disable the validation; this is not something I'd like to do. Does anybody know where in the ASP.NET page lifecycle this exception would have to be handled, as I am having trouble catching it.

 

Thanks you.


I am a content writter !


2 Answers