Client side validation in aspx page

Discussion in 'ASP .Net' started by Paul, Aug 7, 2003.

  1. Paul

    Paul Guest

    Can anyone tell me how I can perfor client side validation in javascript on
    a form in an aspx page.

    All the scripts I use to use in classic asp dont seem to stop the submision
    of the form. Is this because of the runat="server" in the form tag ?

    Any ideas, urls e.t.c would be much appreciated.

    Cheers Big Ears
    Paul, Aug 7, 2003
    #1
    1. Advertising

  2. Hi

    Use Javascript code in Onsubmit event of Form.

    <FORM NAME="F1" Onsubmit=test() >"

    function test()
    {
    return true; //will submit the form

    return false; //wont submit the form
    }

    HTH
    Ravikanth


    >-----Original Message-----
    >Can anyone tell me how I can perfor client side

    validation in javascript on
    >a form in an aspx page.
    >
    >All the scripts I use to use in classic asp dont seem to

    stop the submision
    >of the form. Is this because of the runat="server" in

    the form tag ?
    >
    >Any ideas, urls e.t.c would be much appreciated.
    >
    >Cheers Big Ears
    >
    >
    >.
    >
    Ravikanth[MVP], Aug 7, 2003
    #2
    1. Advertising

  3. Why don't you use Validator Controls?
    They validate the form both on client and server...

    For details: http://localhost/quickstart (I hope you have a virtual
    directory for quickstart)

    "Paul" <> wrote in message
    news:...
    > Can anyone tell me how I can perfor client side validation in javascript

    on
    > a form in an aspx page.
    >
    > All the scripts I use to use in classic asp dont seem to stop the

    submision
    > of the form. Is this because of the runat="server" in the form tag ?
    >
    > Any ideas, urls e.t.c would be much appreciated.
    >
    > Cheers Big Ears
    >
    >
    Bülent Keskin, Aug 7, 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. Matt
    Replies:
    14
    Views:
    4,073
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  2. =?Utf-8?B?dmlkeWE=?=
    Replies:
    1
    Views:
    741
    Kevin Spencer
    Jun 2, 2005
  3. Boss302
    Replies:
    0
    Views:
    1,023
    Boss302
    Nov 21, 2006
  4. Bogdan
    Replies:
    2
    Views:
    639
    Bogdan
    Jun 9, 2008
  5. Sudip
    Replies:
    0
    Views:
    187
    Sudip
    Jul 1, 2005
Loading...

Share This Page