RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


The Baker's Dozen: 13 Tips for Building Database Web Applications Using ASP.NET 3.5, LINQ, and SQL Server 2005 Reporting Services

ASP.NET 3.5 and LINQ provide the greatest amount of functionality yet for building data-aware web applications. Even if you prefer to write stored procedures, you can still leverage some of LINQ to SQL functionality for accessing stored procedures inside .NET.

re you moving a Windows desktop application to the browser, and sweating bullets, or perhaps just not quite sure about how all the new web and data tools work together? With each passing year, Microsoft offers newer and more powerful tools for building rich database applications on the web. So many and so frequently, in fact, that it can be hard to keep up with the new tools and still meet the requirements of your job! This article will show you how to get the most out of the new features in ASP.NET 3.5. The article will also show how you can use features in LINQ, even if you only use stored procedures for data access. And finally, since most applications use reporting, I'll throw in a few nuggets on using SQL Server Reporting Services.

The '411' on Visual Studio 2008 and Web Applications
Visual Studio 2008, recently released, includes a new version of ASP.NET (version 3.5). You may wonder why Microsoft didn't release a version called ASP.NET 3.0. The reason is that the .NET 3.0 framework focused on Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), Windows WorkFlow (WF), and Windows CardSpaces. So the .NET framework version that accompanies Visual Studio 2008 is 3.5.

Before discussing ASP.NET 3.5, the new Visual Studio 2008 environment will greatly please developers who are building web applications for different versions of the .NET framework. Visual Studio 2008 allows you to "target" a project to a specific version of the framework. Figure 1 shows how you can create a new web project and target a specific version of the .NET framework. In other words, you can now use one version of the development environment to target any of the the .NET 2.0, 3.0, or 3.5 frameworks. (Note that .NET 1.1 is not included.)

Figure 1. Framework-Targeting: Visual Studio 2008 provides the ability to target projects to a specific version of the .NET Framework.
You may wonder, "Does this mean that I can completely uninstall my Visual Studio 2005 environment?" Well, like most things, it depends. For many developers, the answer will be "Yes." However, if you are also using Business Intelligence Development Studio to create SQL Server 2005 projects for Analysis Services, Integration Services, and Reporting Services, you will want to keep the Visual Studio 2005 environment, because Visual Studio 2008 does not provide new project templates for SSIS/SSAS/SSRS.

Alternatively, if you had SQL Server Developer Edition installed locally, you "could" remove Visual Studio 2005 altogether, and then remove/reinstall SQL Server 2005, which would give you the basic BIDS environment, though some might view that as a great deal of work for limited dividends.

What's on the Menu?
Let's get right to the menu. This Baker's Dozen article provides these 13 tips:

  • Tips 1-3: Using event delegation for reusable data maintenance functions
  • Tip 4: Subclassing master pages
  • Tip 5: ASP.NET AJAX is now built directly into ASP.NET 3.5!
  • Tip 6: Improved support for nested master pages
  • Tip 7: Paging result sets—why you still can't beat a stored procedure
  • Tip 8: Using LINQ to build a basic data access piece for stored procedures
  • Tip 9: Using LINQ to handle multiple result sets from a stored procedure
  • Tip 10: Building a data-aware web page with LINQ (Part 1 of 2)
  • Tip 11: Building a data-aware web page with LINQ (Part 2 of 2)
  • Tip 12: Using LINQ to XML to handle large XML files
  • Tip 13: The Baker's Dozen Potpourri—some tidbits for SQL Server Reporting Services 2005
Editor's Note: This article was first published in the May/June 2008 issue of CoDe Magazine, and is reprinted here by permission.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date