ASP.NET input validation being fired by wrong control

Discussion in 'ASP .Net' started by JP2006, Aug 23, 2006.

  1. JP2006

    JP2006 Guest

    I am using asp.net input validation on a web form to check user input.
    The web form is on a web user control which is then dragged on to a
    ..aspx page.
    The .aspx page also contains other web user controls in the way of
    various LinkButtons.

    The problem is that although the validation fires correctly when a user
    incorrectly completes the form it also fires when the user clicks on a
    LinkButton on that page!

    I'm sure this should be doable - otherwise you would not be able to
    have mulitiple web user controls that did postbacks on the same page
    which would be nonsensical!
    Hopefully I am missing something obvious ;-)
    Any ideas?
     
    JP2006, Aug 23, 2006
    #1
    1. Advertising

  2. JP2006

    JP2006 Guest

    Figured it out - needed to add the line CausesValidation="false" to
    the other controls to prevent them from firing the validation.
     
    JP2006, Aug 23, 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. =?Utf-8?B?Tmltcm9kIENvaGVu?=

    Page_Load being fired twice

    =?Utf-8?B?Tmltcm9kIENvaGVu?=, May 27, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    776
    Steven Cheng[MSFT]
    Jun 9, 2004
  2. Steven
    Replies:
    0
    Views:
    901
    Steven
    Jul 23, 2004
  3. =?Utf-8?B?VG9ueSBKb2hu?=

    Events being fired multiple number of times...

    =?Utf-8?B?VG9ueSBKb2hu?=, Dec 11, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    395
    =?Utf-8?B?VG9ueSBKb2hu?=
    Dec 11, 2004
  4. mallik
    Replies:
    3
    Views:
    766
    =?Utf-8?B?bG9uZG9uIGNhbGxpbmc=?=
    Jul 7, 2005
  5. Anup
    Replies:
    2
    Views:
    935
    Anup Daware
    Aug 8, 2006
Loading...

Share This Page