What is the coolest way to get data and compare against a value?
Posted on 2006-06-28
I am doing a project for a school that can only do business with clients who are within certain ZipCodes. So I have a table called Users and a table called ValidZips.
I have set the Users Zip to a session variable called sv.Zip. Now what I need to do is load the data from ValidZips and compare sv.Zip against the list of Zips in ValidZips.
So far to accomplish something like this, I would create a local table, fill it with the values from ValidZips and then do a : foreach(DataRow r in Table.Rows) type thing.
I know that there are a lot of tools that I'm not using that c# offers, dataadapters, datasets, etc...
What would be the best technique to solve my problem. I would really like to get better at c# rather than just rehashing my current skills.