473,396 Members | 1,599 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,396 software developers and data experts.

questions regarding validator controls

hi there,

i've got a form with 2 boxes, "New User" and "Existing User"

both have got input boxes with required validators, and both have got a
submit button, but whichever i press, it show the required fields even for
the other box.

is there a way around this, other than putting them on 2 separate forms?

thanks,
Paul
Nov 19 '05 #1
2 1027
Paul,

While I'm a big fan of client side validation. I think the simplest thing
for you to do here would be to just put a label on the form and validate
this yourself server side.

If you really want to get it to work client side and server side then you
could write a custom validator.

Another possibility would be to use a javascript attached to each button's
click that set's the other text box's validator to disabled.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Milsnips" <mi******@hotmail.com> wrote in message
news:u2**************@tk2msftngp13.phx.gbl...
hi there,

i've got a form with 2 boxes, "New User" and "Existing User"

both have got input boxes with required validators, and both have got a
submit button, but whichever i press, it show the required fields even for
the other box.

is there a way around this, other than putting them on 2 separate forms?

thanks,
Paul

Nov 19 '05 #2
See this article for the topic "Several buttons associated with their own
validators". http://aspalliance.com/699#Page4

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

"Milsnips" <mi******@hotmail.com> wrote in message
news:u2**************@tk2msftngp13.phx.gbl...
hi there,

i've got a form with 2 boxes, "New User" and "Existing User"

both have got input boxes with required validators, and both have got a
submit button, but whichever i press, it show the required fields even for
the other box.

is there a way around this, other than putting them on 2 separate forms?

thanks,
Paul

Nov 19 '05 #3

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

Similar topics

0
by: Antonio Maciel | last post by:
Hi. I tried the asp.net newsgroup before but with no success. I have some asp.net validator controls on the pages of a site. In IE the controls work ok but when I run the site on Netscape 7...
0
by: Tom Pearson | last post by:
I create controls and validators dynamically dependent on data at runtime. I create the control then the relevant validator(s) for it assigning the Control.ID as the control to validate. These...
2
by: Pham Nguyen | last post by:
Has anyone seen an example of a textbox server control that has built-in client-side validation? I'd like to build a server control that extends the System.Web.UI.WebControls.TextBox class to allow...
2
by: Dune | last post by:
Hi there, If a control is disabled (enabled = false), will the validator controls associated with it automatically know not to carry out validation? I have a page with a bunch of controls and...
9
by: Alex Shirley | last post by:
Hi there I’m simply trying to check for a blank or empty value in a textbox on my webform. In this instance I do not want to use a requiredfieldvalidator, I want to use a customvalidator (as I...
3
by: Angelos Karantzalis | last post by:
Hi guys, I've a small problem with validators. I'm building a single .aspx file that handles all my form posts. I need to be using ASP.NET validators ( or subclasses thereof ), so what i do to...
1
by: Sam | last post by:
Hi all, Why can't i create a validatorControl as a child of the control to validate? It doesn't give any errors, but it just won't work (it's not validating). The reason why i want this is...
13
by: jcsnippets.atspace.com | last post by:
Hi everybody, A few days ago I decided to get my site validated, so I have begun to clean up the first page to get an impression of what I should and should not do. To be able to get the site...
2
by: Mike Collins | last post by:
I have a form where I create dynamic controls at runtime. With this, I am adding a dynamic required field validator to each control as needed, but the validators are not firing when I click submit....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.