Selective Validation Using Validator Controls

Discussion in 'ASP .Net' started by Bobby Maul, May 26, 2004.

  1. Bobby Maul

    Bobby Maul Guest

    I'm not sure the subject of this post adequately describes my situation, so let my elaborate.

    We have a web form with two textboxes--one for a start date/time and the other for an end date/time. We are wanting to use the validator controls to ensure that the user enters a date/time and that it's in the correct format, along with a couple of other validations. This is easy enough.

    Our web page also includes links to navigate back one page or back all the way to the home page. These two actions are valid even if the dates/times in the textboxes are incorrect.

    So, our question is... is there any way to 'selectively' validate using the validator controls? Again, clicking back or home should be allowed regardless of the validation, but clicking next should trigger the validation.

    Thanks.
     
    Bobby Maul, May 26, 2004
    #1
    1. Advertising

  2. Bobby Maul

    Dan Brussee Guest

    On Wed, 26 May 2004 09:28:59 -0600, "Bobby Maul"
    <> wrote:

    >I'm not sure the subject of this post adequately describes my situation, so let my elaborate.
    >
    >We have a web form with two textboxes--one for a start date/time and the other for an end date/time. We are wanting to use the validator controls to ensure that the user enters a date/time and that it's in the correct format, along with a couple of other validations. This is easy enough.
    >
    >Our web page also includes links to navigate back one page or back all the way to the home page. These two actions are valid even if the dates/times in the textboxes are incorrect.
    >
    >So, our question is... is there any way to 'selectively' validate using the validator controls? Again, clicking back or home should be allowed regardless of the validation, but clicking next should trigger the validation.
    >


    There is a property on the button named (I think) CausesValidation.
    Set that to False.
     
    Dan Brussee, May 26, 2004
    #2
    1. Advertising

  3. Bobby Maul

    Eddie Dodd Guest

    If you change the links to buttons then you have access to the CausesValidation property. set to false those you do not want to validate
    "Bobby Maul" <> wrote in message news:#...
    I'm not sure the subject of this post adequately describes my situation, so let my elaborate.

    We have a web form with two textboxes--one for a start date/time and the other for an end date/time. We are wanting to use the validator controls to ensure that the user enters a date/time and that it's in the correct format, along with a couple of other validations. This is easy enough.

    Our web page also includes links to navigate back one page or back all the way to the home page. These two actions are valid even if the dates/times in the textboxes are incorrect.

    So, our question is... is there any way to 'selectively' validate using the validator controls? Again, clicking back or home should be allowed regardless of the validation, but clicking next should trigger the validation.

    Thanks.
     
    Eddie Dodd, May 27, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RHVuZQ==?=

    validator controls and disabled controls

    =?Utf-8?B?RHVuZQ==?=, Feb 4, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    704
    Peter Blum
    Feb 4, 2004
  2. =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=

    selective validation on specific buttons only

    =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=, Mar 22, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    410
    =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=
    Mar 22, 2005
  3. Laurent R. Therond
    Replies:
    2
    Views:
    429
    Joris Gillis
    Oct 22, 2004
  4. Girish
    Replies:
    0
    Views:
    113
    Girish
    Jan 22, 2004
  5. Bobby Maul

    Selective Validation Using Validator Controls

    Bobby Maul, May 26, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    109
    Bobby Maul
    May 26, 2004
Loading...

Share This Page