DropDownList with subheadings

Posted on 2011-10-07
Last Modified: 2012-08-14
I currently have a classic asp application that has a dropdownlist as pictured below.  Is there anyway to duplicate this in ASP.NET
Question by:us1975mc
    LVL 25

    Accepted Solution

    One way is to override the rendering of the control, such that the option groups are used.
    As a possible option, create a new class (possibly inherited from ListItem and INamingContainer) for a list item group that contains a collection of list items. In the render event for the control, output the option group HTML tag "<optgroup>" and then call all list items in the collection for the list items.
    LVL 83

    Assisted Solution


    Author Closing Comment


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now