Potentially dangerous Request.Form value for Cancel button Click

G

Guest

Hello all
I have simple edit form. When user saves data that contains restricted
characters such as (< > , etc.) , regular expression validator will display
a warning message. It all works fine, but if users decides to exit the form
using Cancel button then error occurs: A potentially dangerous Request.Form
value was detected from the client. The Cancel button has CausesValidation
set to false.

Is there any way to avoid this error without setting <%@ Page
validateRequest="false" %>?
All I want to do is just exit the screen. I could probably clean all
textboxes on Cancel button click event using JavaScript. Is there better way
to handle this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top