June 19, 2007

Pimp Out Your Panels - Part1

The ASP.NET 2.0 Panel control is a valuable, albeit somewhat plain, control. Although useful, it’s difficult to get excited about it — until you see all the new functionality with which it can be enhanced by taking advantage of the free, open source ASP.NET AJAX Control Toolkit. Packed with rich functionality, this toolkit is a goldmine for Web developers looking to save AJAX development time. The source code is a boon, as well, for those anxious to develop their own AJAX-enhanced controls. This article will examine in detail several of the more than 30 components that come with this exciting toolkit.

For more information about installing and configuring the ASP.NET AJAX Control Toolkit, see Working with the ASP.NET AJAX Control Toolkit by Daniel N. Egan. For toolkit download details, code samples, and documentation, go to http://ajax.asp.net/ajaxtoolkit/.

Rounded Corners

Square corners are so passé. Over the years there have emerged a variety of techniques for rounding the corners of an otherwise square page element. Most of the techniques involve using a variety of images to represent each corner and side. Most of the techniques also share another thing in common: they’re painful. They are far more complicated to implement than one would expect for such a seemingly trivial cosmetic request.

Finally, there’s a solution that makes the task as simple as it should be: The ASP.NET AJAX Control Toolkit provides RoundedCornersExtender, which enhances the standard old Panel control (or similar page elements) with the ability to be configured with curvaceous edges (see Figure 1).


Figure 1. RoundedCornersExtender visually enhances page elements with modern-looking curves.

RoundedCornersExtender is declared like this:

<ajaxToolkit:RoundedCornersExtender

ID=”RoundedCornersExtender1″

runat=”server” Radius=”10″

TargetControlID=”Panel1″>

ajaxToolkit:RoundedCornersExtender>

Read more

0 comments: