Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1048263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:25:43+00:00 2026-05-16T16:25:43+00:00

Currently in asp.net, we can have only one value in a ListItem in a

  • 0

Currently in asp.net, we can have only one value in a ListItem in a DropDownList. However I hope I can:

<MultiValueDropDownList id="ddl" runat="server" />
ddl.Items.Add(new MultiValueListItem { Text="text", DBValue="db", EngineValue=1 });
var dbValue = ddl.SelectedItem.DBValue;

What I’m going to do is inherit DropDownList and ListItem. Do you guys have any better solutions?

[Closed]

At last I decide to choose a lazy way. Store the values in ListItem.Attributes. And using extension methods of DropDownList to help to get the collection of values. Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:25:43+00:00Added an answer on May 16, 2026 at 4:25 pm

    See if this helps:

    EasyListBox

    How to display multi-column in ASP Dropdown List?

    asp.net : an alternative to multi-column DropDownList Gridview within dropdownlist / combobox (using the Ajax DropDownExtender)

    Edit:

    You can not inherit from ListItem.

    See why: Extending ASP.NET DropDownList

    The best solution then is to store the values inside ListItem.Attributes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a blog application in ASP.NET MVC. I can't quite figure
I currently have an asp.net website hosted on two web servers that sit behind
I currently have an ASP.net 2.0 site with multiple ASP.Net 1.1 sites running as
I have a problem with my ASP.NET website, it got hacked. One hacker found
I currently have an ASP.NET script for a TV guide which displays the data
I'm currently toying with asp.net mvc3 and have a question with respect to models
Is there a library out there which I can use in my current ASP.NET
How can I correctly handle exceptions thrown from controllers in ASP.NET MVC? The HandleError
Currently ASP.NET MVC's OutputCache attribute has a huge downfall. If you want to cache
I am currently using asp.NET MVC to build a Content Management System parts of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.