Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regexp in Validation Control

Status
Not open for further replies.

jfrost10

Programmer
Jun 3, 2001
2,004
CA
Hey gang,

I need to write a regexp for a validation control that will display the error message when it finds
No Client Selected
in the value.

I have absolutly NO experience with regexp, and the opensource/php crowd doesn't seem very warm to us microsoft marks.
;)

anybody know off hand how I could write this?
thanks,

Jack
 
do you mean you want to put a regular expression validator on a dropdownlist?

as far as i know, the regex validator is mostly used to control textbox... this is what i know :) perhaps you should have used compare validator instead

just in my opinion though ^-^
 
Hey ja,

You can use any of the validators on any control, but they work best for text boxes. All the examples I've seen for the comparison validator have been for comparing the value of one text box to another, but you could be on to something there...I'll let you know if it works out on Monday.

Thanks

Jack
 
another opinion from me jack ^-^

why don't you use dropdownlist rather than textbox? it will keep your client from inserting invalid value to your code ^0^ (just another opinion of mine... well i don't know what you're facing though ^-^)
 
I am using a drop down list actually. problem is that the validator defaults to the .Text property of the ddl, not the .Value property

jack
 
oooohhhhh... i got your problem ^-^... yeah it's true, the default is the Text property, well i don't know either if you want to compare the Value property.

perhaps you should make your own validator that can check the Value property of the ControlToValidate control ^-^
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top