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

Help! Comparing Data

Status
Not open for further replies.

trickytr

Programmer
Joined
May 21, 2005
Messages
6
Location
TR
Hi everyone,

First of all I am new to ASP.NET. I want to compare the data entered by user on a textbox with information on the SQL. For example we have two textboxes and user enters a country and a city like France and Paris.And I want to look through the sql database and find the data related to France and compare the city column with the user data.
I haveno problem in accessing to the database and getting the data but I don't know how to compare them.

If there is any function or solution you can suggest ? would be glad.

Thanks
 
I would suggest having 2 drop down boxes. On with Countries, and the other containing cites that are contained in that contry the user selects. You can use the SelecedIndexedChanged event of the Country drop down to populate the city drop down.
 
It is not clear what you are having a problem with.

"Select * from tblCities where country = '" & txtCountry.Text & "' and city = '" & txtCity.Text & "'"

You should use dropdowns like jbenson001 suggest.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top