troubleshooting Question

Set selected item on Dropdown list using c#?

Avatar of tsniff
tsniffFlag for United States of America asked on
ASP.NET
2 Comments1 Solution411 ViewsLast Modified:
I have a drop down list that has many options.

Example:

<option value="1">Red</option>
<option value="2">Green</option>
<option value="3">Blue</option>
<option value="4">Orange</option>

I am then querying a table to determine which option should be selected based on value.

For example I might get back 3 from my query.

This means Blue should be the selected option.  

How can I accomplish this?
ASKER CERTIFIED SOLUTION
satish_nagdev

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros