Welcome!

.NET Authors: Liz McMillan, Peter Silva, Yakov Werde, Matthew Pollicove , Corey Roth

Related Topics: .NET

.NET: Article

Summing Up the New ASP.NET Controls

ASP + .NET 2.0 = productivity

The GridView offers the same easy data binding to the new data source controls listed above, but in addition to that it offers fully functional sorting and paging with no extra code. Simply set the AllowSorting and AllowPaging properties to true and the work is done. The GridView control also offers improved ways to allow for editing of records as well as much better support for different controls used in columns rather than simple text.

Another new feature of the GridView is the EnableSortingAndPagingCallbacks property, which when set to true, will generate client-side scripting to handle the sorting and paging of the GridView without causing an entire page post back to the server. This is a nice addition for grid-intense Web pages and it functions much as an Ajax DLL would.

ReportViewer Control
The reporting functionality in .NET 2.0 has been revamped and enhanced. The ReportViewer, CrystalReportPartsViewer, and CrystalReportSource controls are used to design, generate, and display reports in a visual format that is much easier than anything used in .NET 1.x.

DetailsView Control
The DetailsView control displays a single record from a query at a time and does so with every field displaying on a separate row. The control has full functionality for inserting, updating, deleting, and paging and works great in combination with the GridView control explained above to give the user master-detail information on a query.

FormView Control
The FormView control is very similar to the aforementioned DetailsView, but rather than displaying all of the fields in rows, you display them in user-defined templates. The biggest difference here is that you have much more control over exactly how the data is displayed. It also has built in support for data binding, paging, inserting, updating, and deleting.

WebParts Controls
Finally, WebParts are one of the most exciting new features of ASP.NET 2.0. Ideal for portal systems and personalized Web sites, WebParts allow you to easily develop Web site sections that can be added, moved, deleted, etc., on an individual basis per user of your system. .NET 2.0 uses a slick client-side drag-and-drop technique to allow the user to move the WebParts around the page (see in Figure 3). WebParts can be dropped onto any WebPartZone control that you have set up on your page.

Other key controls used in WebParts are:

  • WebPartManager: Not a visible run-time control, this control maintains the WebParts on the screen and ensures that they all work together.
  • CatalogZone: Allows you to let the user add new WebParts that are not currently visible to the page.
  • EditorZone: This control houses different EditorPart controls (AppearanceEditorPart, BehaviorEditorPart, LayoutEditorPart, PropertyGridEditorPart) and allows users to personalize their pages accordingly.
  • ConnectionZone: Houses ConnectionPart controls that allow different WebParts to communicate with each other.
As you can see, the folks at Microsoft have heard a lot of our complaints and requests from working with .NET 1.x and have spent a lot of time coming up with some tremendous additions to the controls that are already available. While .NET 2.0 offers some great additions to the language such as generics and other modifications to the environment itself, the real treasure awaiting us all is arguably in the great enhancements to the ASP.NET toolset. With the combination of variety of purpose and the power and flexibility these new controls offer, there's no doubt that you'll find many of them extremely useful in your next development project.

More Stories By Aaron Reed

Aaron Reed is an assistant professor specializing in software architecture and design and .NET development at Neumont University in Salt Lake City, UT. He has worked professionally in the industry for over 12 years as a lead architect/designer, development manager, and VP of development. When he isn't spending time reading up on the latest in software development, Aaron loves spending time with his beautiful wife and three children.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
SYS-CON Australia News Desk 03/12/06 04:36:24 PM EST

On the eve of the official release of .NET 2.0, developers around the world were anxiously waiting and priming their PCs for a speedy download from MSDN. And who could blame them? Microsoft's .NET development platform has been a hit with the developer community ever since the first betas came out years ago.