how to skip validation control

Discussion in 'ASP .Net' started by Joe Au, Aug 6, 2004.

  1. Joe Au

    Joe Au Guest

    I create a (left) panel control to hold some image buttons, and a (right)
    panel to hold some textboxes and corresponding validation controls. When I
    press one of the button on the left panel, then the validatons takes place
    on the right panel to show up the error messages. How can I skip these
    validation if the user really want to leave the right panel?
    Thanks.
    Joe Au, Aug 6, 2004
    #1
    1. Advertising

  2. The problem I see with this approach is that it will cancel all validation,
    not just validation for the other panel. A thought would be to make the
    panels iframes. That way they are completely independant of eachother.
    Although this may not work for you.

    "Brad Quinn" wrote:

    > If you have a button that allows the user to "leave the right panel", set the
    > CausesValidation property on that button to false.
    >
    > "Joe Au" wrote:
    >
    > > I create a (left) panel control to hold some image buttons, and a (right)
    > > panel to hold some textboxes and corresponding validation controls. When I
    > > press one of the button on the left panel, then the validatons takes place
    > > on the right panel to show up the error messages. How can I skip these
    > > validation if the user really want to leave the right panel?
    > > Thanks.
    > >
    > >
    > >
    =?Utf-8?B?UnlhbiBSaWRkZWxs?=, Aug 6, 2004
    #2
    1. Advertising

  3. On Sat, 7 Aug 2004 00:36:45 +0800, Joe Au <> wrote:

    > I create a (left) panel control to hold some image buttons, and a (right)
    > panel to hold some textboxes and corresponding validation controls. When
    > I
    > press one of the button on the left panel, then the validatons takes
    > place
    > on the right panel to show up the error messages. How can I skip these
    > validation if the user really want to leave the right panel?
    > Thanks.
    >
    >


    ah, this is called validator grouping, and it's coming in ASP.NET 2.0.
    For now, you either have to homegrow a solution or find a third-party
    control (such as Peter's validators at
    http://www.peterblum.com/VAM/Home.aspx) that usually cost money.

    The easiest solution is to turn off client-side validation, as I assume
    this is what you're talking about, and validate on the server side
    instead. Otherwise I also did this myself for a project by hacking the
    Javascript functions that Microsoft uses in

    C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_4322\WebUIValidation.js

    for example, to enable/disable controls myself on button clicks.

    The server side validation solution, you just check things like
    Page.IsValid and validatorControl.IsValid to verify if errors are really
    errors...

    --
    Craig Deelsnyder
    Microsoft MVP - ASP/ASP.NET
    Craig Deelsnyder, Aug 6, 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. poi

    Skip HttpModule Use?

    poi, Oct 29, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    419
    John Saunders
    Oct 29, 2003
  2. anand

    Skip HTML Tags while searching

    anand, Jun 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    434
    Oleg Tkachenko [MVP]
    Jun 8, 2004
  3. Replies:
    1
    Views:
    508
    Rutger Smit
    Jan 19, 2005
  4. =?Utf-8?B?QmlsbCBCb3Jn?=

    Need to skip field in tab order

    =?Utf-8?B?QmlsbCBCb3Jn?=, Feb 17, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    4,497
    boogster
    Mar 25, 2010
  5. Martijn Mulder

    skip super.paintComponent()

    Martijn Mulder, Feb 14, 2006, in forum: Java
    Replies:
    1
    Views:
    2,906
    John C. Bollinger
    Feb 15, 2006
Loading...

Share This Page