Welcome Guest!
Create Account | Login
Locator+ Code:

Search:
FTPOnline Channels Conferences Resources Hot Topics Partner Sites Magazines About FTP RSS 2.0 Feed

Free Trial Issue of Visual Studio Magazine

email article
printer friendly
get the code
more resources

Maximize Productivity With ASP.NET
Give your productivity a major boost with Microsoft's new Web-development platform.
by Dan Wahlin

Posted November 7, 2003

Technology Toolbox: C#, SQL Server 2000, ASP.NET, XML

Microsoft's release of the .NET Framework and ASP.NET in 2002 sparked a revolution in Web development, making it possible to create event-driven, compiled, and object-oriented Web applications rapidly. If you use ASP.NET, you no doubt appreciate its power and are eager to know what the future holds for the platform.

ADVERTISEMENT

ASP.NET 2 maximizes your productivity by simplifying tasks you perform frequently. Adding user personalization, logging users in and out, paging/sorting data, and creating templated Web sites are much simpler and require minimal coding, compared to ASP.NET 1.1. C# and VB.NET also have new capabilities, such as generics and partial classes, that help your Web applications be more flexible and maintainable. (I won't discuss language features in this article [see Additional Resources]).

The learning curve associated with moving from version 1.0 to version 2.0 of ASP.NET is by no means as steep as the curve you might have encountered when migrating from ASP to ASP.NET, but version 2 is packed with new features (see the sidebar, "Harness ASP.NET Version 2's Power"). I'll use a fictitious Web site called GolfClubShack to introduce you to several of them and show you code that puts these features to use (see Figure 1 and download the sample code). Keep in mind that the code samples are based on the alpha bits and might need changes between now and version 2's final release, scheduled for 2004.

Let's begin by showing how to fit an entire Web site almost effortlessly with a consistent look and feel. When you use ASP.NET 1.1, you give a site its look and feel by placing user controls on each page, or by creating custom template solutions (see Additional Resources). Version 2 lets you design a single page, called a master page, where you define consistent elements—such as headers, footers, and menus—in one place. Master pages have a file extension of MASTER and contain a "master" directive at the top of the page:

<%@ master language="C#" %>

You specify where to place a page's actual content in the master page by adding a new server control named ContentPlaceholder (see Listing 1).




Back to top














Java Pro | Visual Studio Magazine | Windows Server System Magazine
.NET Magazine | Enterprise Architect | XML & Web Services Magazine
VSLive! | Thunder Lizard Events | Discussions | Newsletters | FTP Home