Tricky Control Validation Issue

Discussion in 'ASP .Net' started by Mark Sandfox, Dec 15, 2004.

  1. Mark Sandfox

    Mark Sandfox Guest

    I have a tricky control validation issue. I have probably designed this the
    wrong way but here is what I have.

    I have 6 TextBoxes; tbPN, tbA, tbC, tbS, tbZ, tbDOB and there are 20 of each
    with a corresponding number following the names. (Couldn't get ASP.NET to
    recognize a control array)

    The question is: How do I get the tbA, tbC, tbS, tbZ, & tbDOB to be
    required if (AND ONLY IF) tbPN has text? I have tried in the past to get
    VBScript to intertwine with ASPX but to no avail. I must be missing the
    bigger picture here. Thank you in advance for your help and guidance.
    Mark Sandfox, Dec 15, 2004
    #1
    1. Advertising

  2. Have you looked into custom validators?

    http://msdn.microsoft.com/library/d...on/html/vbtskvalidatingwithcustomfunction.asp

    "Mark Sandfox" wrote:

    > I have a tricky control validation issue. I have probably designed this the
    > wrong way but here is what I have.
    >
    > I have 6 TextBoxes; tbPN, tbA, tbC, tbS, tbZ, tbDOB and there are 20 of each
    > with a corresponding number following the names. (Couldn't get ASP.NET to
    > recognize a control array)
    >
    > The question is: How do I get the tbA, tbC, tbS, tbZ, & tbDOB to be
    > required if (AND ONLY IF) tbPN has text? I have tried in the past to get
    > VBScript to intertwine with ASPX but to no avail. I must be missing the
    > bigger picture here. Thank you in advance for your help and guidance.
    >
    >
    >
    =?Utf-8?B?U3VyZXNo?=, Dec 15, 2004
    #2
    1. Advertising

  3. Mark Sandfox

    Peter Blum Guest

    Microsoft's predefined validators do not know how to sense a value in
    another control before enabling themselves.

    A custom validator will let you write this but you have to recreate the
    logic of the original validator that you are replacing, including on the
    client-side.

    I build a replacement to Microsoft's validators designed to get the job
    done, even difficult tasks like this. "Professional Validation And More"
    (http://www.peterblum.com/vam/home.aspx) includes 22 validators. All have a
    new property, Enabler, where you setup a rule that enables them. In your
    case, the rule is to check if tBPN has text. It supports client-side
    validation on many more browsers too, not just IE and IE/Mac.

    Even if you aren't looking for a replacement, it helps to know the
    limitations of the controls you are using to make better design decisions. I
    put together a list at http://www.peterblum.com/vam/valmain.aspx.

    --- Peter Blum
    www.PeterBlum.com
    Email:
    Creator of "Professional Validation And More" at
    http://www.peterblum.com/vam/home.aspx

    "Mark Sandfox" <> wrote in message
    news:BqXvd.5840$...
    >I have a tricky control validation issue. I have probably designed this
    >the
    > wrong way but here is what I have.
    >
    > I have 6 TextBoxes; tbPN, tbA, tbC, tbS, tbZ, tbDOB and there are 20 of
    > each
    > with a corresponding number following the names. (Couldn't get ASP.NET to
    > recognize a control array)
    >
    > The question is: How do I get the tbA, tbC, tbS, tbZ, & tbDOB to be
    > required if (AND ONLY IF) tbPN has text? I have tried in the past to get
    > VBScript to intertwine with ASPX but to no avail. I must be missing the
    > bigger picture here. Thank you in advance for your help and guidance.
    >
    Peter Blum, Dec 15, 2004
    #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. VB Programmer
    Replies:
    4
    Views:
    2,165
    Natty Gur
    Aug 13, 2003
  2. Qaran

    tricky jdbc issue

    Qaran, May 11, 2005, in forum: Java
    Replies:
    7
    Views:
    747
    steve
    May 13, 2005
  3. Replies:
    9
    Views:
    522
    CBFalconer
    Apr 25, 2006
  4. Joseph Geretz

    Tricky Request Filtering Issue

    Joseph Geretz, Sep 3, 2008, in forum: ASP .Net
    Replies:
    3
    Views:
    405
    Joseph Geretz
    Sep 3, 2008
  5. Mark Sandfox

    Tricky Control Validation Issue

    Mark Sandfox, Dec 15, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    122
    Mark Sandfox
    Dec 15, 2004
Loading...

Share This Page