CustomValidate, another problem

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2006
Posts: 2
Reputation: Anna Krieger is an unknown quantity at this point 
Solved Threads: 0
Anna Krieger Anna Krieger is offline Offline
Newbie Poster

CustomValidate, another problem

 
0
  #1
Aug 31st, 2006
I use CustomValidate to check för "<" in the beginning of text entered into few text boxes. It goes just fine, as long as the user deletes the potentially dangerous sign and updates the page. But if the user choses to break the update and instead press Exit button, the unpleasant error page is shown, [HttpRequestValidationException (0x80004005). The error message states that a “potentially dangerous Request.Form value was detected…” I don't want to rewrite the validation, as date and e-mail validators are really good. Is there any way to avoid the error page showing up? I did put CausesValidation="False" on my Exit button but in this case it does not help. Help is needed quickly, I haven't much time, so if anyone knows a remedy, answer PLEASE!
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 206
Reputation: plazmo is an unknown quantity at this point 
Solved Threads: 16
plazmo's Avatar
plazmo plazmo is offline Offline
Posting Whiz in Training

Re: CustomValidate, another problem

 
0
  #2
Sep 1st, 2006
its not the button you would turn validation off . its on the textbox.
or you can put ValidateRequest="false" also at the top of your page, to turn off validation on everything

Originally Posted by Anna Krieger View Post
I use CustomValidate to check för "<" in the beginning of text entered into few text boxes. It goes just fine, as long as the user deletes the potentially dangerous sign and updates the page. But if the user choses to break the update and instead press Exit button, the unpleasant error page is shown, [HttpRequestValidationException (0x80004005). The error message states that a “potentially dangerous Request.Form value was detected…” I don't want to rewrite the validation, as date and e-mail validators are really good. Is there any way to avoid the error page showing up? I did put CausesValidation="False" on my Exit button but in this case it does not help. Help is needed quickly, I haven't much time, so if anyone knows a remedy, answer PLEASE!
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2
Reputation: Anna Krieger is an unknown quantity at this point 
Solved Threads: 0
Anna Krieger Anna Krieger is offline Offline
Newbie Poster

Re: CustomValidate, another problem

 
0
  #3
Sep 2nd, 2006
I didn't know it's possible to turn of a validation on a user control when there is validation on other controls. I'll check it right away., thank You for the tip. Don't want to turn it off for the whole page, as it wouldn't check the other field. Anyway, I resolved it by stopping the user from keying "<" into the textboxes.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC