Bypass validation on cancel

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Bypass validation on cancel

    Can anyone point me to some documentation on bypassing validation controls
    when a user selects cancel?

    What I have is a user control with a form to fill out information on a
    subject. The user should be presented with two buttons a "Submit" and a
    "Cancel". When the "Cancel" button is selected all of the items on the user
    control should be cleared. However, I have validation controls setup for
    each item necessary on the form and when hitting cancel all of the
    validation controls activate preventing cancel from being activated. How
    can I make this button "bypass" the validation sequence so that just the
    form is cleared?

    This seems like it would need to be a javascript handled event on the client
    side so that it acts like a 'clear' method and doesn't actually submit
    anything. I could write that in to the application but I'm wondering if
    there is a way to do this in ASP.NET "style" without having to introduce
    javascript.

    Thanks,
    Corey


    Corey Olsen Guest

  2. Similar Questions and Discussions

    1. CFFORM Validation trumping Custom Form Validation
      Is there any way for custom form validation to work in concert with the cfform validation? I have a custom script that compares the values of two...
    2. copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome?
      I have a web form with several fields. If I copy & paste from a RTF document into a field, the javascript validation and field length are bypassed...
    3. Datagrid - cancel Validation
      My app is doing all edits in the datagrid footer. The footer has some columns with textboxes and validation controls that look at the textboxes....
    4. Cancel validation?
      Hi everyone, I have a VB.NET web form with some field validators and Save and Cancel buttons. What I want to do is on the Cancel button On_Click...
    5. validation summary doesnt display when there's client-side validation
      I have a custom validator that validates a numeric field, txtField, that allows for thousand separators. I also placed a validation summary so...
  3. #2

    Default Re: Bypass validation on cancel

    Corey,

    I had the same problem but if you set the CauseValidation property of the
    cancel button to False your problem is solved.

    regards,

    Jurjen de Groot
    G.I.T.S. Netherlands

    "Corey Olsen" <pbyfra@gnyjro.arg> wrote in message
    news:e$lPRwyPDHA.1608@TK2MSFTNGP11.phx.gbl...
    > Can anyone point me to some documentation on bypassing validation controls
    > when a user selects cancel?
    >
    > What I have is a user control with a form to fill out information on a
    > subject. The user should be presented with two buttons a "Submit" and a
    > "Cancel". When the "Cancel" button is selected all of the items on the
    user
    > control should be cleared. However, I have validation controls setup for
    > each item necessary on the form and when hitting cancel all of the
    > validation controls activate preventing cancel from being activated. How
    > can I make this button "bypass" the validation sequence so that just the
    > form is cleared?
    >
    > This seems like it would need to be a javascript handled event on the
    client
    > side so that it acts like a 'clear' method and doesn't actually submit
    > anything. I could write that in to the application but I'm wondering if
    > there is a way to do this in ASP.NET "style" without having to introduce
    > javascript.
    >
    > Thanks,
    > Corey
    >
    >

    Jurjen de Groot Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139