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...

Drawing images and bar charts with System Drawing : Mark Smith

Monday, June 30 2008

Summary: An example of how we can create an image and even bar charts by using the System.Drawing namespace. Drawing your own images in ASP.NET can be achieved by using what is known as GDI+. To work with GDI+, we can use the System.Drawing namespace which provides direct access to GDI+ basic graphics functionality. For this example, we'll be working specifically with the System.Drawing.Graphics namespace which will allow us to draw rectangles and lines. To demonstrate these methods, we'll create a simple example that simply draws a rectangle out to our page. Firstly, we'll need to import these...