Need some help or tip using dropdownlist or gridview


I have a question about how to do one thing.

Say that I have a table with cars.
The key in the table is :
id, year,color, name,  modell
(where id is a number)

I also Have a editbox where the user should be able to search for things.
Ie if I type Chrysler in the box
and there is only one Chrysler  I will start to display some information found in the database based on this record.

However, if there are more than one Chrysler
I want to have a dropdown list saying
Chrysler voyager,  red 1997
Chrysler voyager blue 2002

and let the user select which one to load data from.
When they do a selection I like to display the result as from the first one.

How can I do that.
In some other languages and not for the web I could store complete Car objects
in the dropdown. But I can't se how I can do this here.  
The text I want to have in the dropdown is not enough to have a key to send to the database)

If this could be done with a gridview instead of a radiobutton I would be satisfied.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bob LearnedCommented:
You can bind the DropDownList.DataSource to any complex structure, as in this example:

Binding ASP.NET DropDownList to data structures

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pucko73Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.