Print this page Share

ASP.NET 2.0 Website Programming: Problem - Design - Solution

ISBN: 978-0-7645-8464-0
600 pages
May 2006
ASP.NET 2.0 Website Programming: Problem - Design - Solution (0764584642) cover image


ASP.NET 2.0 Programming: Problem Design Solution is aimed at describing, designing, and implementing a site much like the ones you’re probably working on or will be soon, while taking the opportunity to introduce and explain many of the new features that the new great ASP.NET 2.0 framework offers. Difficult problems are addressed head-on so you'll be ready for most of the problems you’ll typically face when writing a modern website, and have one or more solutions ready for them.

Unlike many other ASP.NET books that show examples for individual pages or features, the example in this book is an integrated end-to-end site (written in C#). The entire book and site has been written specifically for ASP.NET 2.0, to use the ASP.NET 2.0 features wherever they make sense.

The end-result is a website which features a layout with user-selectable themes, a membership system, a content management system for publishing and syndicating articles and photos, polls, mailing lists, forums, an e-commerce store with support for real-time credit card processing, homepage personalization, and localization. The book leads the reader through development of a site with:

  • Account registration, personalization and theming
  • News and events, organized into categories
  • Opinion polls
  • Newsletter
  • Forums
  • E-commerce store with shopping cart and order management
  • Localization
Administration of a site will be covered including:
  • Full online back-end administrative section, to manage practically all data from an intuitive user interface
  • Site deployment
In building these site features, you'll learn these new ASP.NET 2.0 features:
  • Master pages
  • Theming
  • Personalization & Web parts
  • Membership & Profile modules
  • Personalization
  • The new server-side UI controls such as GridView, DetailsView, FormView, Wizard, MultiView, the new xxxDataSource and navigation controls, among others.
  • The new compilation mode and deployment modes
  • The new framework for instrumenting the site, as well as handling & logging exceptions
  • The new ADO.NET 2.0 features (e.g. caching with database dependency)
  • The new classes for easy distributed transactions Management

This book is also available as part of the 5-book ASP.NET 2.0 Wrox Box (ISBN: 0-470-11757-5). This 5-book set includes:

  • Professional ASP.NET 2.0 Special Edition (ISBN: 0-470-04178-1)
  • ASP.NET 2.0 Website Programming: Problem - Design - Solution (ISBN: 0764584642 )
  • Professional ASP.NET 2.0 Security, Membership, and Role Management (ISBN: 0764596985)
  • Professional ASP.NET 2.0 Server Control and Component Development (ISBN: 0471793507)
  • ASP.NET 2.0 MVP Hacks and Tips (ISBN: 0764597663)
  • CD-ROM with more than 1000 pages of bonus chapters from 15 other .NET 2.0 and SQL Server(TM) 2005 Wrox books
  • DVD with 180-day trial version of Microsoft(r) Visual Studio(r) 2005 Professional Edition
See More

Table of Contents




Chapter 1: Introducing the Project: TheBeerHouse.

Chapter 2: Developing the Site Design.

Chapter 3: Planning an Architecture.

Chapter 4: Membership and User Profiling.

Chapter 5: News and Article Management.

Chapter 6: Opinion Polls.

Chapter 7: Newsletters.

Chapter 8: Forums.

Chapter 9: E-commerce Store.

Chapter 10: Personalization and Web Parts.

Chapter 11: Localizing the Site.


See More

Author Information

Marco Bellinaso is a partner of Code Architects Srl, an Italian company that specializes in consulting, mentoring, development, and training for the Microsoft platform. He works as a senior consultant and developer, and has a particular interest in all “web-things.” He focuses on designing and implementing large web sites with a variety of Microsoft products and technologies, including SharePoint 2003, MCMS, and, of course, ASP.NET 2.0 and SQL Server 2005. He’s been working with the .NET Framework since the Beta 1 on applications of all types, including Web Services, Windows Forms, and Windows Services. He is also author or co-author of a number of commercial tools for developers, such as the award-winning VBMaximizer add-in, CodeBox for .NET, and FormMaximizer for .NET. Before the .NET era, Marco was a hardcode VB developer who specialized in Windows programming with advanced, low-level API techniques, as well as a COM and ASP developer.
Prior to this book, Marco co-authored a number of other Wrox Press books, including Fast Track ASP.NET, Visual C# .NET: A Guide for VB6 Developers, Beginning C#, and the previous edition of this book for ASP.NET 1.1. He also frequently writes for programming magazines such as MSDN Magazine, MSDN Online, Visual Studio Magazine, and other Italian magazines such as Computer Programming and Visual Basic & .NET Journal. He is one of the principal developers and editors behind www.dotnet2themax.com, a popular web site for .NET developers that was sired by the even more famous www.vb2themax.com site for VB6. Besides writing, he also does a lot of public speaking (both in English and Italian) at some of the most important Italian conferences organized by Microsoft Italy and other big companies.
If you want to contact Marco to talk about the book, about beer and pubs, or about work-related questions, please use the form on his site (www.dotnet2themax.com) or his blog (www.dotnet2the max.com/blogs/mbellinaso).
See More


This book is different from most others you can find in bookstores. Most offerings in this area are mainly reference books that dissect every little detail of version 2.0 of ASP.NET or the .NET Framework and that – in the best cases – provide a short listing to illustrate each feature. Marco’s book has a radically different approach: he explains how you can assemble all ASP.NET 2.0’s features and leverage its power to design, develop, and deploy a full-featured Web site. Don’t be fooled by the TheBeerHouse being a fictitious site for a fictitious customer: if the main differences between a sample application and a real-world Web site are the performance, security, robustness, scalability, and care for details that you expect from a commercial site, then Marco’s TheBeerHouse is more real-world than most real-world sites I have seen recently.

In fact, unlike most real site authors, Marco was able to take all the time he needed to implement an impressive list of features and fix all the bugs he bumped into. And unlike most sample application authors, he never took a shortcut and never ignored the problems that developers have to solve every day in the real world. For sure, the overall quality exceeds what you might expect from a mere “book sample” and, as of this writing, it’s the best demonstration of ASP.NET 2.0’s new features, including Microsoft’s own starter kits.

From a teaching perspective, the great value of this book is the rationale underlying all the design and implementation decisions taken in the development phase. Marco does more than just describing what he did: he lists the pros and cons of all the alternatives he tried out and explains how he found the perfect solution (or the best compromise) to each problem. It’s like having an expert sitting besides you, able to read your mind, and ready to fix your mistakes before you have a chance to make them. Can you ask for more? -- Francesco Balena, author of widely popular Microsoft Press books.

See More

Related Websites / Extra

Wrox Blox: Migrating to LINQ to SQL in TheBeerHouse and ASP.NET 2.0 Website Programming Problem Design SolutionThis Wrox Blox demonstrates various LINQ to SQL techniques to use in upgrading the “Articles” portion of TheBeerHouse application. The first step is migrating TheBeerHouse project from an ASP.NET 2.0 to an ASP.NET 3.5 application. Next, create a LINQ to SQL class (DBML) mapping file that will encapsulate the entire Data Access Layer for this project. Readers will become comfortable working with Entities (Tables), navigating Associations (Relationships), and working with stored procedures from a LINQ standpoint, throughout the implementation.
TheBeerHouse: CMS & e-commerce StarterKit on CodePlexThe author Marco Bellinaso has released the book's code on the popular code-sharing and development site CodePlex. We encourage readers to join the author there in making improvements to the code.
See More


Download TitleSizeDownload
Download Code
The single zip file contains all the needed code for TheBeerHouse sample application built throughout the book. Please see the readme.txt in the zipfile for additional installation and setup information. This is the C# version of the code written by the author as presented in the book.
4.09 MB Click to Download
Download TheBeerHouse Sample Code
The single zip file contains all the needed code for a VB version of TheBeerHouse sample application built throughout the book. Please note that this VB version of the code is reader created and cannot be supported by Wrox technical support. Please see the readme.txt in the zipfile for additional support, installation, and setup information.
6.30 MB Click to Download
Application Solutions for Chapters 2-5

In response to popular demand, this download contains the chapter-by-chapter application solutions for chapters 2-5 of this project. This is the C# version of the code. These chapter by chapter solutions are created by forum user MythicalMe and are not supported by Wrox/Wiley technical support.

10.05 MB Click to Download
Figure Corrections 5-2
page 196:, figure 5-2
1. The class heading "MB.TheBeerHouse.DAL.Articles.Provider"

should be:
2. In the above referenced class,
"Instance : MB.TheBeerHouse.DAL.PollsProvider"
,br> should be:
"Instance : MB.TheBeerHouse.DAL.ArticlesProvider"
197.53 KB Click to Download
Figure Corrections 5-3
1. The class heading "MB.TheBeerHouse.BLL.Forums.BaseForum"
should be "MB.TheBeerHouse.BLL.Articles.BaseArticle"


2 The class heading "MB.TheBeerHouse.DAL.CommentDetails"
should be "MB.TheBeerHouse.BLL.Comment".


3 In this same class, "Title : decimal" should be deleted, "ArticleID : int" should be added


4 "Body : decimal" should be "Body : string"


5. In class "MB.TheBeerHouse.BLL.Articles.Article", "Category : MB.TheBeerHouse.BLL.Srticles.Category"
should be "MB.TheBeerHouse.BLL.Articles.Category"


6 The class heading "MB.TheBeerHouse.DAL.CommentDetails" should be "MB.TheBeerHouse.BLL.CommentComparer"
156.65 KB Click to Download
See More


Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
2 8 Error in Text
Second paragraph, Sentence 4:
Second instance of 'Windows' should be 'IE'
2 12 Error in Code
<link href="/styles.css" text="text/css" rel="stylesheet" />

Should be

<link href="/styles.css" type="text/css" rel="stylesheet" />
2 17 Error in Text
1st line:
code-beside file

should be:
code-behind file
2 22 Error in Code
last code block on page, 3rd line:
<siteMapNode title="Books" url="~/Books/Books.aspx>

should be:
<siteMapNode title="Books" url="~/Books/Books.aspx">
2 22 Error in Text
After heading "Defining a Site Map File" first paragraph, 2nd line:

a hierarchical structure of <siteMapPath> nodes

Should be

a hierarchical structure of <siteMapNode> nodes
2 36 Error in Code
last shaded section of code; next to last line on page:

should be:
2 44 Error in Code
first shaded code block, lines 9-11 (not counting blanks):
if ((onlyTextBoxes && ctl is TextBox) || ctl is TextBox ||
ctl is DropDownList || ctl is ListBox || ctl is CheckBox ||
ctl is RadioButton || ctl is RadioButtonList || ctl is CheckBoxList)

should be these 4 lines instead:
if ((onlyTextBoxes && ctl is TextBox) ||
(!onlyTextBoxes && (ctl is TextBox || ctl is DropDownList ||
ctl is ListBox || ctl is CheckBox || ctl is RadioButton ||
ctl is RadioButtonList || ctl is CheckBoxList)))
59 Typo
abstract class DataAccess
protected int Exec uteNonQuery(DbCommand cmd)

should read:
abstract class DataAccess
protected int ExecuteNonQuery(DbCommand cmd)
101 Error in Code
code sample, 10th line reads:
set { base["connectionStdefaultConnectionStringNameringName"] = value; }

should be:
set { base["defaultConnectionStringName"] = value; }
104 Error in Text
p 104, 3 places:

txtSubmit appears in:
1. top block of shaded code, 3rd line from end: ID="txtSubmit"
2. end of that same line: OnClick="txtSubmit_Click"
3. first line of the 2nd shaded code block on the page: txtSubmit_Click(object sender, EventArgs e)

text reads:

should be:
115 Error in Text
p115, First line in boxed text should begin "A great new..." (missing A)
126 Error in Text
p 126, first line:

text reads:

should be:
4 132 Error in Text
"The ChangePassword control enables users to recover or reset their password"

should be:

"The PasswordRecovery control enables users to recover or reset their password"
233 Error in Code
Page 233, In second gray box starting with the 14th line:

Code reads:

public bool Approve(){
bool ret = Article.ApproveArticle(this.ID);
if(success) this.Approved = true;
return ret;

Should read:

public bool Approve(){
bool success = Article.ApproveArticle(this.ID);
if(success) this.Approved = true;
return success;
339 Error in Code
The first code listing, second line:
ThreadStart ts = new ThreadStart(Test)

Should be:
ThreadStart ts = new ThreadStart(ExecuteTask)
11 507 Error in Text
February 2

should be:

February 7
See More

Related Titles

Back to Top