validation controls not consistent

Discussion in 'ASP .Net' started by Guest, Aug 26, 2003.

  1. Guest

    Guest Guest

    Hi,

    We make extensive use of validation controls on forms across our sites. For
    the most part they seem to work okay, but every now and again some data that
    should never have passed through the validators gets inserted into the
    database. We've tested and the validators always work for us when we input
    the same data ourselves. I suspect this has to do with certain browsers not
    being compatible with the javascript the controls produce. However,
    shouldn't the validator controls validate both client-side and server-side
    on a submit? Basically, are we going to have to have 2 sets of validation
    logic like in asp.old (client-side javascript and server-side code) to get
    the validation to work correctly?

    Cheers

    Chris
     
    Guest, Aug 26, 2003
    #1
    1. Advertising

  2. Chris,

    Yes, the validators do validate both client and server side.

    But server side you need to check if they returned valid before executing
    any code that relys on them being valid:

    If Page.IsValid Then
    '---Execute code here
    End If

    Sincerely,

    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzche


    <> wrote in message
    news:...
    > Hi,
    >
    > We make extensive use of validation controls on forms across our sites.

    For
    > the most part they seem to work okay, but every now and again some data

    that
    > should never have passed through the validators gets inserted into the
    > database. We've tested and the validators always work for us when we

    input
    > the same data ourselves. I suspect this has to do with certain browsers

    not
    > being compatible with the javascript the controls produce. However,
    > shouldn't the validator controls validate both client-side and server-side
    > on a submit? Basically, are we going to have to have 2 sets of validation
    > logic like in asp.old (client-side javascript and server-side code) to get
    > the validation to work correctly?
    >
    > Cheers
    >
    > Chris
    >
    >
     
    S. Justin Gengo, Aug 26, 2003
    #2
    1. Advertising

  3. Guest

    Guest Guest

    Thanks, just what i was looking for.

    Cheers

    Chris

    "S. Justin Gengo" <> wrote in message
    news:uiwE$...
    > Chris,
    >
    > Yes, the validators do validate both client and server side.
    >
    > But server side you need to check if they returned valid before executing
    > any code that relys on them being valid:
    >
    > If Page.IsValid Then
    > '---Execute code here
    > End If
    >
    > Sincerely,
    >
    > --
    > S. Justin Gengo, MCP
    > Web Developer
    >
    > Free code library at:
    > www.aboutfortunate.com
    >
    > "Out of chaos comes order."
    > Nietzche
    >
    >
    > <> wrote in message
    > news:...
    > > Hi,
    > >
    > > We make extensive use of validation controls on forms across our sites.

    > For
    > > the most part they seem to work okay, but every now and again some data

    > that
    > > should never have passed through the validators gets inserted into the
    > > database. We've tested and the validators always work for us when we

    > input
    > > the same data ourselves. I suspect this has to do with certain browsers

    > not
    > > being compatible with the javascript the controls produce. However,
    > > shouldn't the validator controls validate both client-side and

    server-side
    > > on a submit? Basically, are we going to have to have 2 sets of

    validation
    > > logic like in asp.old (client-side javascript and server-side code) to

    get
    > > the validation to work correctly?
    > >
    > > Cheers
    > >
    > > Chris
    > >
    > >

    >
    >
     
    Guest, Aug 27, 2003
    #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. Peter Merwood

    bgcolor attribute not consistent between PCs

    Peter Merwood, Jan 28, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    363
    Hermit Dave
    Jan 28, 2004
  2. Bernie
    Replies:
    0
    Views:
    560
    Bernie
    Sep 5, 2004
  3. Harry Whitehouse
    Replies:
    0
    Views:
    305
    Harry Whitehouse
    Sep 15, 2004
  4. Replies:
    2
    Views:
    494
  5. lovecreatesbeauty
    Replies:
    1
    Views:
    1,066
    Ian Collins
    May 9, 2006
Loading...

Share This Page