Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Tricky Control Validation Issue

Reply
Thread Tools

Tricky Control Validation Issue

 
 
Mark Sandfox
Guest
Posts: n/a
 
      12-15-2004
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.


 
Reply With Quote
 
 
 
 
=?Utf-8?B?U3VyZXNo?=
Guest
Posts: n/a
 
      12-15-2004
Have you looked into custom validators?

http://msdn.microsoft.com/library/de...omfunction.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.
>
>
>

 
Reply With Quote
 
 
 
 
Peter Blum
Guest
Posts: n/a
 
      12-15-2004
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$ m...
>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.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tricky Request Filtering Issue Joseph Geretz ASP .Net 3 09-03-2008 05:09 AM
a tricky if else(maybe not tricky but impossible) nirkheys@gmail.com C Programming 9 04-25-2006 06:13 PM
tricky jdbc issue Qaran Java 7 05-13-2005 10:36 PM
Tricky Control Validation Issue Mark Sandfox ASP .Net Web Controls 0 12-15-2004 01:58 AM
HELP: Custom DataReader Function - Tricky issue VB Programmer ASP .Net 4 08-13-2003 03:43 AM



Advertisments
 



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