Data Validation

Discussion in 'ASP .Net' started by Niclas, Jan 2, 2006.

  1. Niclas

    Niclas Guest

    Hi,

    I need to validate some data before it is submitted preferably using any of
    the validation controls in Visual Studion (2003), but the validation is
    slightly complex and require converision to datetime format etc. I suppose
    it would be possible to write a regular expression to do the validation, but
    I don't have the skills for this.

    I would prefer to write a function that validates my data and return a
    boolean that indicates if it is valid or not. Is it possible to incorporate
    the outcome from a validation function to a validation summary control ?

    Niclas
    Niclas, Jan 2, 2006
    #1
    1. Advertising

  2. On Mon, 2 Jan 2006 22:55:47 -0000, "Niclas"
    <> wrote:

    >Hi,
    >
    >I need to validate some data before it is submitted preferably using any of
    >the validation controls in Visual Studion (2003), but the validation is
    >slightly complex and require converision to datetime format etc. I suppose
    >it would be possible to write a regular expression to do the validation, but
    >I don't have the skills for this.
    >
    >I would prefer to write a function that validates my data and return a
    >boolean that indicates if it is valid or not. Is it possible to incorporate
    >the outcome from a validation function to a validation summary control ?
    >
    >Niclas
    >


    You bet it is! As a matter of fact there is a control for what you
    want to do. It's called the CustomValidator control. When it fires
    the ServerValidate event you can do your validation any way you need
    to via a method or in lines of code in the event.


    Otis Mukinfus
    http://www.otismukinfus.com
    http://www.tomchilders.com
    Otis Mukinfus, Jan 3, 2006
    #2
    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. Colin Mackay
    Replies:
    0
    Views:
    2,679
    Colin Mackay
    Jun 25, 2003
  2. Libs
    Replies:
    0
    Views:
    1,485
  3. Colin Basterfield

    Web form validation vs object validation

    Colin Basterfield, Nov 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    423
    Tommy
    Nov 29, 2003
  4. Matt
    Replies:
    14
    Views:
    4,076
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  5. Lucas Tam
    Replies:
    2
    Views:
    1,095
    Lucas Tam
    Feb 26, 2004
Loading...

Share This Page