problem with validation control

Discussion in 'ASP .Net Web Controls' started by Rafia, Jun 30, 2004.

  1. Rafia

    Rafia Guest

    Hi all
    I have put a required validation control on one of my aspx pages. I also
    have a server button on the page which the user will click to submit the
    data. The problem is when the user do not enter anything on the required
    field, it show the error then immediately submits the form and the code in
    my server control event handler starts to execute.

    Any help will be appreciated
    Rafia, Jun 30, 2004
    #1
    1. Advertising

  2. Rafia

    Teemu Keiski Guest

    Hi,

    does this happen when accidentally clicking enter when focus is in the field
    (it is textboxt?)? Note that you should also check Page.IsValid property in
    code at the server-side before letting critical code to run. But, if the
    problem is that you wouldn't have client script files correctly set up in
    the site root, please check it too.

    Here is a good article about ASp.NEt validation generally:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspplusvalid.asp

    --
    Teemu Keiski
    MCP, Microsoft MVP (ASP.NET), AspInsiders member
    ASP.NET Forum Moderator, AspAlliance Columnist
    http://blogs.aspadvice.com/joteke


    "Rafia" <> wrote in message
    news:...
    > Hi all
    > I have put a required validation control on one of my aspx pages. I also
    > have a server button on the page which the user will click to submit the
    > data. The problem is when the user do not enter anything on the required
    > field, it show the error then immediately submits the form and the code in
    > my server control event handler starts to execute.
    >
    > Any help will be appreciated
    >
    >
    Teemu Keiski, Jun 30, 2004
    #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,672
    Colin Mackay
    Jun 25, 2003
  2. Libs
    Replies:
    0
    Views:
    1,479
  3. Lucas Tam
    Replies:
    2
    Views:
    1,088
    Lucas Tam
    Feb 26, 2004
  4. =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=

    Using Summary Validation control with server Custom validation

    =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=, Oct 15, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    868
    =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=
    Oct 15, 2004
  5. bnp
    Replies:
    4
    Views:
    282
Loading...

Share This Page