AspNetAtoms.com daily updates on ASP.NET Tutorials, Articles, Authors and more. Subscribe to our newsletter and receive updates on ASP.NET resources on the Internet.

Categories

Recent Posts

Extending the DropDownList to Support Enums : Steven Smith

Monday, June 30 2008

In this article, Steve demonstrates how to bind a DropDownList to an Enum type, and then goes on to create a generic EnumDropDownList control which will automatically display any enum type's contents. A fairly common task in some of the applications I work with is to provide a user with a DropDownList of options that is populated by an enum. This can easily be done with a little bit of code to bind a stock DropDownList control to the enum, but this kind of thing quickly starts to violate the DRY (Don't Repeat Yourself) principle, so I created a simple derived DropDownList control that takes advantage of Generics to make it especially effective and require less code and casting of data types....



Read More:
Extending the DropDownList to Support Enums : Steven Smith
Also See:
Creating Bar Chart Using .NET Graphics API : Mohammad Azam
How to use ImageMap Control : Richard Bean
Drawing images and bar charts with System Drawing : Mark Smith
Create a gallery without the use of any code : Wesley Bakker
Asynchronous Callbacks and Ajax based UI Experience in Web Applications : Deepak Raghavan

Post your comment

Comment