"cancel" a web form without doing validation

Results 1 to 2 of 2

Thread: "cancel" a web form without doing validation

  1. #1
    Join Date
    Dec 1969

    Default "cancel" a web form without doing validation

    I have a web form - on which I do some "requiredfieldvalidation" when user clicks on the <BR>"ADD" button. On my web form, I have 2 buttons (Add & Cancel)<BR>Add buttons does form validation and then if valid, it inserts record into DB.<BR>If user clicks on the Cancel button, I just want it to redirect my user back to the "menu" page. But when clicking on the cancel button, it does the validation.....thus if I don&#039;t enter anything into my textbox on my form, it will not process the redirect, because it fails on the "requiredfieldvalidation"....I need to just bypass this validation when the Cancel button is clicked....HOW IS THIS DONE?<BR><BR>Currently I just have an "onclink" event - within this event, I have a response.redirect("menu.aspx")....

  2. #2
    Join Date
    Dec 1969

    Default Disable Validation

    Hi,<BR>you can disable the validation of you Cancel button thru the CauseValidation property.<BR>HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts