473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Can one validation control work for multiple textboxes?

I have a huge form with 91 controls on it and about 1/3 of them are date
fields. Is it possible to use just one compare validator to make sure dates
are being entered or do I have to make one for each text box?

Also can someone think of a easy way to make it so all of these date text
boxes will convert a date entered like this 120203 to 12/02/2003?
Nov 18 '05 #1
3 1965
The validation controls were designed to work with only one control each.
You can extend this model if the standard controls don't meet your
requirements.
Here is some information you might find 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
Hire top-notch developers at http://www.able-consulting.com

"Russ" <ru**@NOSPAMacordiamn.com> wrote in message
news:uJ*************@TK2MSFTNGP11.phx.gbl...
I have a huge form with 91 controls on it and about 1/3 of them are date
fields. Is it possible to use just one compare validator to make sure dates are being entered or do I have to make one for each text box?

Also can someone think of a easy way to make it so all of these date text
boxes will convert a date entered like this 120203 to 12/02/2003?

Nov 18 '05 #2
I tried:

txtbox.Text = txtbox.Text.ToString("##/##/##");

It would not compile saying that their were invalid arguments.
"Russ" <ru**@NOSPAMacordiamn.com> wrote in message
news:uJ*************@TK2MSFTNGP11.phx.gbl...
I have a huge form with 91 controls on it and about 1/3 of them are date
fields. Is it possible to use just one compare validator to make sure dates are being entered or do I have to make one for each text box?

Also can someone think of a easy way to make it so all of these date text
boxes will convert a date entered like this 120203 to 12/02/2003?

Nov 18 '05 #3
Joe
Have you considered using dropdown lists instead of textboxes? This gives
you control of the formatting.

Joe

"Russ" <ru**@NOSPAMacordiamn.com> wrote in message
news:eD**************@TK2MSFTNGP10.phx.gbl...
I tried:

txtbox.Text = txtbox.Text.ToString("##/##/##");

It would not compile saying that their were invalid arguments.
"Russ" <ru**@NOSPAMacordiamn.com> wrote in message
news:uJ*************@TK2MSFTNGP11.phx.gbl...
I have a huge form with 91 controls on it and about 1/3 of them are date
fields. Is it possible to use just one compare validator to make sure

dates
are being entered or do I have to make one for each text box?

Also can someone think of a easy way to make it so all of these date text boxes will convert a date entered like this 120203 to 12/02/2003?


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: DBQueen | last post by:
I am developing an application for a Pathology Lab. There are Batches (BatchID) which contain multiple Samples (SampleID), and there can be multiple tests run from the same Sample, thus there can...
4
by: Kathy | last post by:
I have a form to generate a report. On the form are several textboxes and a "Generate" button. I would like to have the button grayed (not enabled), unless the data in each of the dependant...
4
by: earwicker | last post by:
I recently deployed a web application which contains a user registration form with the usual fields: name, address, email, password, etc. Each of the TextBoxes uses a validation control to verify...
7
by: A.M | last post by:
Hi, I have a validation control in my page that upon any invalid data, it disables all buttons in the page. basicly i don't have any postback in the page if the validator finds any error. How...
4
by: Mad Scientist Jr | last post by:
i am trying to set focus to a specific control depending on the outcome of a validator control and it is not working. none of these methods are working to setfocus: 1....
1
by: Kum | last post by:
Hi, I need help in asp.net dynamic textbox controls validation. I am creating textbox controls dynamically on a asp.net webpage. Now after creating the textboxes on the page I want to validate...
5
by: Richard Brown | last post by:
Ok, I've been looking through the .NET SDK docs and stuff. I'm wondering if you can provide a control extender that does generic validation or functionality just by dropping it on the form. For...
12
by: NuB | last post by:
The validation controls are giving me a headache. here is what i'm trying to do and so far what I've tried has not worked. I need to hide my grid if the page is not valid how can i accomplish...
12
by: Dabbler | last post by:
I need to insure that at least one of three phone number fields has a value (requiredfield) but I'm not sure of a way to implement this without server side logic. Is there a way to use the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.