[Last Call] Learn how to a build a cloud-first strategyRegister Now


DropDownList with subheadings

Posted on 2011-10-07
Medium Priority
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 27

Accepted Solution

Shaun Kline earned 1000 total points
ID: 36933497
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

CodeCruiser earned 1000 total points
ID: 36935883

Author Closing Comment

ID: 36950699

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month18 days, 5 hours left to enroll

830 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