PrefaceI REMEMBER SITTING IN A ROOM on the Microsoft campus in August of 2003 listening to Scott Guthrie and others from the ASP.NET team present the wide array of new features coming in ASP.NET 2.0. They astounded us with one demo after another of features that greatly simplified Web development, and in such a pluggable and extensible fashion so that changes could be made at any level as needed during the development process. As with its predecessor, I knew that this release was going to change the way developers built Web applications, and it would be compelling enough to bring many more developers to the ASP.NET platform.
Over the
Sample Code, Web Site, FeedbackAll of the code samples in this book are drawn from working samples available for display and download at http://pluralsight.com/essentialasp.net2/. The site also contains examples written in VB.NET and a listing of all links and references mentioned in the book. Any errata found after publication will be posted on this site, as well as a supplemental set of more extended examples of the concepts presented in this book for your reference. The authors welcome your comments, errata, and feedback via the forms available on the Web site. Volume 2, Not Second Edition
This book is fundamentally a companion book to my first book on ASP.NET,
Essential ASP.NET with Examples in C#
, and is not a second edition. You will notice little to no overlap between the two books, and, in fact, I strongly
Chapter 1ArchitectureThe discussion of codebehind should be read only lightly, as it has changed in 2.0, although the ASP.NET 1.1 model of codebehind is still supported. Chapter 2WebForms
The discussion of codebehind and server-side control integration can be skipped, as this has changed in ASP.NET 2.0. The last section on building WebForms with Visual Studio can be
Chapter 3ConfigurationAll of this chapter is still completely relevant. Do note that every use of ConfigurationSettings should now be ConfigurationManager in ASP.NET 2.0. Chapter 4HTTP PipelineThe discussion of asynchronous handlers can be skipped in anticipation of the entire chapter dedicated to asynchrony (Chapter 9) in this new book. Chapter 5Diagnostics and Error HandlingAll of this chapter is still completely relevant in ASP.NET 2.0. Chapter 6Validation
All of this chapter is still completely relevant in ASP.NET 2.0. Be aware that client-side validation now works cross-browser (not just in Internet Explorer as it did in ASP.NET 1.1). Also, there is a new ValidationGroup property you can associate with validation controls and
Chapter 7Data BindingSkip over the discussion of the DataGrid control, as it has been replaced by the GridView control in ASP.NET 2.0. In the template discussion, replace every occurrence of DataBinder.Eval(Container.DataItem, ...) with Eval(...) , which is the new expression in ASP.NET 2.0. Chapter 8Custom ControlsAll of this chapter is still completely relevant in ASP.NET 2.0. Whenever you see references to RegisterClientScriptBlock, replace it with ClientScript.RegisterClientScriptBlock for ASP.NET 2.0. In the discussion of data-bound and composite controls, be aware that there are two new control base classes in ASP.NET 2.0, DataBoundControl and CompositeControl, which should be used as base classes when creating these types of controls. There are also many new designer integration features in ASP.NET 2.0. Chapter 9CachingAll of this chapter is still completely relevant in ASP.NET 2.0. Chapter 10State ManagementAll of this chapter is still completely relevant in ASP.NET 2.0. Chapter 11Security
All of this chapter is still completely relevant in ASP.NET 2.0. Be aware that many of the features discussed in the forms authentication section are much easier to build in ASP.NET 2.0 because of the membership feature. Understanding the details of how Forms authentication works is still critical to using membership properly, however, and thus this discussion is a good
Organization of This BookChapter 1, Architecture , covers the changes in the architecture of ASP.NET with this release, including a new codebehind mechanism, new Page events, new specially named compilation directories, a new compiler utility, and Web Application Projects.
Chapter 2,
Chapter 3, Data Binding , describes the new declarative data source model introduced with ASP.NET 2.0. It starts with a discussion of the fundamentals of declarative data sources and moves through many different usages, including SQL, stored procedures, and objects.
Chapter 4, State Management
, describes three new state-
Chapter 5, Security , covers the new security features in ASP.NET 2.0 with a special focus on the provider model. It includes lots of practical advice on choosing and configuring Membership and Role providers. It also covers the new login controls and other new features, such as cookieless forms authentication and configuration file encryption.
Chapter 6, Web Parts
, describes the collection of components and controls introduced in ASP.NET 2.0 for constructing customizable portal sites. These components manage the details of storing user customization data, providing the interface for customization, and managing the Web Parts you define as
Chapter 7, Diagnostics , explores management, instrumentation, and diagnostics in ASP.NET 2.0, focusing on the new health monitoring system. The key abstraction here is the Web event, and this chapter introduces the built-in events and providers as well as helps you build your own. At the end of the chapter is an introduction to ASP.NET 2.0 support for Event Tracing for Windows (ETW), showing how you can diagnose problems in a running ASP.NET application without having to attach a debugger. Chapter 8, Performance , covers the new performance-related features of ASP.NET 2.0, including many new caching features as well as a client-callback architecture. Among the new caching features covered are data source caching, SQL cache dependencies, post-cache substitution, and configuration file settings for cache control.
Chapter 9, Asynchrony
, looks at the new Async="true" attribute on the @Page directive in ASP.NET 2.0, and how it can be used to improve the responsiveness of pages in your site as well as increase the overall scalability of the application. Several ways of introducing asynchrony into your pages are covered, including implicitly using the AsyncOperationManager, explicitly using asynchronous
|