3.3. Solution

The "Solution" section of this chapter is thinner than those found in most of the other chapters. In fact, in this chapter you've been presented with some new controls and features that won't be part of a common custom framework, but will be used in most of the upcoming chapters as parts of other classes to be developed. Other features, such as exception handling and logging, and the transaction management, are already built in and are so easy to use that they don't need to be encapsulated within custom business classes. The discussion about the DAL and BLL design will be extremely useful for the next chapters, because they follow the design outlined here. Understand that ASP.NET 2.0 already has a number of built-in common services to handle many of your general framework-level needs, which allows you to focus more of your time and efforts on your specific business problems. The rest of the chapter shows the code for the small base classes for the DAL and the BLL, the custom configuration section, and the code for raising and handling web events.

3.3.1.

3.3.1.1. TheBeerHouse Configuration Section

Following is the code (located in the /App_Code/ConfigSection.cs file) for the classes that map the <theBeerHouse> custom configuration section, and the inner <contactForm> element, whose meaning and properties were already described earlier:

namespace MB.TheBeerHouse { public class TheBeerHouseSection : ConfigurationSection { [ConfigurationProperty("defaultConnectionStringName", ...

Get ASP.NET 2.0 Website Programming Problem - Design - Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.