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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

validating multiple controls in ASP.NET

Status
Not open for further replies.

alku83

Technical User
Apr 5, 2001
4
AU
Hello,

I am trying to create a page for a timetable system. It has two drop down lists, one containing departure points and one containing destination points. I would like to be able to check that the user has not selected the same stop as both the destination and the departure point.

I have created this using a simple lable, and hiding/showing it as required when the user clicks the continue button, but I would like to be able to do this using one of the built-in validators, so that the user gets the instant response rather than only after they click the Continue button.

So, to my question - is it possible to access another controls data from within a validator? Or can a validator only be associated with one particular control?

I assume it's also possible to recreate this sort of action using some javascript?

Any help would be appreciated.

Thanks,
Ben.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top