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 User285819-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.


Updated on 20-Dec-2014
I am a content writter !

Can you answer this question?


Answer

2 Answers

Liked By