Professional Web Applications Themes

Validation Controls - ASP.NET General

Hello, I have placed many validation controls on an aspx webform and a user control that allows the visitor to enter a username and password and bypass the form. The problem I am having is that the validation controls are firing and not allow the visitor to logon because the validation controls are saying that the other textboxes need to be filled in. Is there a way around this problem? Or do I have to discard all the validation controls on the page and namually generate validation logic in the submit buttons? Thanks Chuck...

  1. #1

    Default Validation Controls

    Hello, I have placed many validation controls on an aspx webform and a user
    control that allows the visitor to enter a username and password and bypass
    the form. The problem I am having is that the validation controls are
    firing and not allow the visitor to logon because the validation controls
    are saying that the other textboxes need to be filled in.

    Is there a way around this problem? Or do I have to discard all the
    validation controls on the page and namually generate validation logic in
    the submit buttons?

    Thanks

    Chuck


    Charles A. Lackman Guest

  2. #2

    Default Re: Validation Controls

    Make sure ur bottons .causevalidation is set to false
    and u should be able to manualy check the things you want
    ie if myvalidator.isvalid

    "Charles A. Lackman" <Charlescet.com> wrote in message
    news:udaO9koQDHA.2476TK2MSFTNGP10.phx.gbl...
    > Hello, I have placed many validation controls on an aspx webform and a
    user
    > control that allows the visitor to enter a username and password and
    bypass
    > the form. The problem I am having is that the validation controls are
    > firing and not allow the visitor to logon because the validation controls
    > are saying that the other textboxes need to be filled in.
    >
    > Is there a way around this problem? Or do I have to discard all the
    > validation controls on the page and namually generate validation logic in
    > the submit buttons?
    >
    > Thanks
    >
    > Chuck
    >
    >

    Vincent V Guest

  3. #3

    Default validation controls

    I've a datagrid with a textbox with autopostback=True and also validation
    controls.
    Even if the validation controls fail the postback still occurs.
    How can i stop this happening?

    ian


    Ian Oldbury Guest

  4. #4

    Default Re: validation controls

    You can test for page validity in the form load event .

    If Not Page.IsValid Then
    ' only executed when the page has been validated.
    End If

    You cannot assume the user has client side script enabled, that's why
    validation control run at both client side and server side (also so a savvy
    users cannot post nonvalidated input to the server), just make sure the page
    is valid before you perform your processing.

    HTH,
    Jared

    "Ian Oldbury" <ian_oldbury_NO_msn_SPAM_.com> wrote in message
    news:%23n1mCktqEHA.536TK2MSFTNGP09.phx.gbl...
    > I've a datagrid with a textbox with autopostback=True and also validation
    > controls.
    > Even if the validation controls fail the postback still occurs.
    > How can i stop this happening?
    >
    > ian
    >
    >

    Jared Guest

  5. #5

    Default Re: validation controls

    Sorry, this should exclude the not in the test
    If Page.IsValid Then
    ...
    End If

    "Jared" <ask_me_for_itnospam.com> wrote in message
    news:10mfqdm79r6l1cfcorp.supernews.com...
    > You can test for page validity in the form load event .
    >
    > If Not Page.IsValid Then
    > ' only executed when the page has been validated.
    > End If
    >
    > You cannot assume the user has client side script enabled, that's why
    > validation control run at both client side and server side (also so a
    > savvy users cannot post nonvalidated input to the server), just make sure
    > the page is valid before you perform your processing.
    >
    > HTH,
    > Jared
    >
    > "Ian Oldbury" <ian_oldbury_NO_msn_SPAM_.com> wrote in message
    > news:%23n1mCktqEHA.536TK2MSFTNGP09.phx.gbl...
    >> I've a datagrid with a textbox with autopostback=True and also validation
    >> controls.
    >> Even if the validation controls fail the postback still occurs.
    >> How can i stop this happening?
    >>
    >> ian
    >>
    >>
    >
    >

    Jared Guest

Similar Threads

  1. Validation Between Controls
    By DS in forum ASP.NET Data Grid Control
    Replies: 2
    Last Post: November 18th, 09:33 PM
  2. BIG WARNING - validation controls appear to be ignored.
    By Andy Fish in forum ASP.NET Security
    Replies: 7
    Last Post: February 26th, 05:20 PM
  3. Adding validation controls programmatically
    By D Sheldon in forum ASP.NET Building Controls
    Replies: 0
    Last Post: May 11th, 06:31 PM
  4. Validation on custom controls
    By msnews.microsoft.com in forum ASP.NET Building Controls
    Replies: 0
    Last Post: July 18th, 02:26 PM
  5. Validation Controls Postback
    By Rafael Veronezi in forum ASP.NET General
    Replies: 2
    Last Post: July 3rd, 01:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139