Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Single Validator for 3 field Phone Number

Reply
Thread Tools

Single Validator for 3 field Phone Number

 
 
Sharon Traineanu via .NET 247
Guest
Posts: n/a
 
      05-07-2004
I'm using C#.net.

I have a phone number in three asp textboxes. I'd like to make the phone number required, and validate to make sure only numbers have been entered.

My main problem is I can't find a way to have all three textboxes use the same validator and not display 3 error messages.

--------------------------------
From: Sharon Traineanu

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>eZGYaPTSrUuCnHzI4El7Lg==</Id>
 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      05-07-2004
This is just not possible with the standard validation controls.
You'll have to create your own solution.
For this, you might find these links useful:
http://msdn.microsoft.com/library/de...mmatically.asp

http://msdn.microsoft.com/library/de...ionresults.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net



"Sharon Traineanu via .NET 247" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> I'm using C#.net.
>
> I have a phone number in three asp textboxes. I'd like to make the phone

number required, and validate to make sure only numbers have been entered.
>
> My main problem is I can't find a way to have all three textboxes use the

same validator and not display 3 error messages.
>
> --------------------------------
> From: Sharon Traineanu
>
> -----------------------
> Posted by a user from .NET 247 (http://www.dotnet247.com/)
>
> <Id>eZGYaPTSrUuCnHzI4El7Lg==</Id>



 
Reply With Quote
 
 
 
 
Peter Blum
Guest
Posts: n/a
 
      05-10-2004
Hi Sharon,

Instead of writing custom code, there is a commercial solution that lets you
do this without coding. "Professional Validation And More"
http://www.peterblum.com/vam/home.aspx has 22 validators. Its
MultiConditionValidator lets you combine the power of validators into a
single validator. For example, you would be able to combine Required
validators and DataTypeCheck validators like this:
TextBox1 is Required AND TextBox1 must be an integer AND TextBox1 must have
3 characters AND
TextBox2 is Required AND TextBox2 must be an integer AND TextBox2 must have
3 characters AND
TextBox3 is Required AND TextBox3 must be an integer AND TextBox3 must have
4 characters

The result generates client-side code that is supported by IE,
Netscape/mozilla, Opera 7, and Safari (Microsoft's validators are limited to
DHTML browsers).

--- Peter Blum
www.PeterBlum.com
Email: http://www.velocityreviews.com/forums/(E-Mail Removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Sharon Traineanu via .NET 247" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> I'm using C#.net.
>
> I have a phone number in three asp textboxes. I'd like to make the phone

number required, and validate to make sure only numbers have been entered.
>
> My main problem is I can't find a way to have all three textboxes use the

same validator and not display 3 error messages.
>
> --------------------------------
> From: Sharon Traineanu
>
> -----------------------
> Posted by a user from .NET 247 (http://www.dotnet247.com/)
>
> <Id>eZGYaPTSrUuCnHzI4El7Lg==</Id>



 
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
Free Phone to Phone Calling.. From any phone to any other anywhere coolguy17111987 VOIP 0 07-01-2007 07:27 AM
Free Phone to Phone Calling.. From any phone to any other anywhere coolguy17111987 Cisco 0 07-01-2007 07:27 AM
1.Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed" Sound Javascript 2 09-28-2006 02:43 PM
required field validator - prevent number and allow space Andy Eshtry ASP .Net 1 02-02-2004 09:50 AM
required field validator - prevent number and allow space Andy Eshtry ASP .Net Web Controls 1 02-02-2004 09:50 AM



Advertisments