did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

Essential ASP.NET With Examples in C#

9780201760408

Essential ASP.NET With Examples in C#

  • ISBN 13:

    9780201760408

  • ISBN 10:

    0201760401

  • Edition: 1st
  • Format: Paperback
  • Copyright: 02/11/2003
  • Publisher: Addison-Wesley Professional
  • Newer Edition
Sorry, this item is currently unavailable.

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Extend or Purchase Your Rental at Any Time

Need to keep your rental past your due date? At any time before your due date you can extend or purchase your rental through your account.

Summary

It was late at night in Torrance, California, in August 2000. I had spent 12 hours of the day teaching DevelopMentor’s Guerrilla COM course with Mike Woodring and Jason Whittington. Don Box had come over after class, and, as usual, we were staying up late into the night after the students had long since gone to bed, discussing technology and hacking. Microsoft had just released its preview version of .NET at the PDC in July, and we had been spending much of the year up to that point digging into “the next COM” and were excited that it had finally been released so we could talk about it. It was that evening that Don, in his typical succinct way, showed me my first glimpse of ASP.NET (then called ASP+). Perhaps it was the late hour or the fact that I had been teaching all day, but I have to admit that although I “got” the technical details of what Don was showing me, I was somewhat underwhelmed by being able to change the innerText of an h1 element from a class.

The following week, after a couple of good nights of sleep, I revisited the .aspx example and began to explore ASP.NET in more detail. After a day of reading and experimenting, I finally “got it” and I was hooked. This technology was poised to fundamentally change the way people built Web applications on Windows, and it took full advantage of the new .NET runtime. I spent the next six months researching, building ASP.NET applications, and writing DevelopMentor’s Essential ASP.NET course, and I spent the subsequent year and a half teaching, speaking, and writing about ASP.NET. This book is the culmination of those activities, and I hope it helps you in your path to understanding ASP.NET.

C# versus VB.NET

Before .NET, Visual Basic was not just another language—it was a platform unto itself. Building applications in Visual Basic 6.0, for example, was completely different from using C++ and MFC. With .NET, this distinction is gone, and Visual Basic is indeed just another .NET language that uses the same libraries, the same development tools, and the same runtime as all others. As a consequence, we can now talk about technologies like ASP.NET from a language-neutral standpoint. The code samples, however, must be shown in a particular language, so this book is published in two versions: one with examples in C# and one with examples in VB.NET. All content outside the examples is nearly identical between the two books.

Sample Code, Web Site, Feedback

All the code samples in this book are drawn from working samples available for display and download from the book’s Web site at http://www.de-velop.com/books/essentialasp.net. This site also contains any errata found after publication and a supplemental set of more extended examples of the concepts presented in this book for your reference. The author welcomes your comments, errata, and feedback via the forms available on the Web site.

Prerequisites

This book focuses exclusively on ASP.NET and does not spend time reviewing .NET programming, object-oriented programming techniques, database access, or general Web application development techniques. You will be able to get the most out of this book if you have spent some time gaining experience in each of these areas.

Organization of This Book

This book approaches ASP.NET from the ground up, beginning with a look at the core elements of the architecture in Chapter 1 and continuing with the server-side control model in Chapter 2. It is recommended that the reader be familiar with the contents of Chapters 1 and 2 before reading any of the subsequent chapters. However, all chapters after 2 can be read independently and in any desired sequence.

Chapter 1, Architecture, covers the fundamentals of the ASP.NET architecture, beginning with a look at the parsing of .aspx files and their subsequent compilation into assemblies. This chapter explains the details of the Page class, demonstrates the new code-behind model, and discusses the shadow copy mechanism used to prevent file locking. The chapter concludes with a look at the new classes in ASP.NET that replace the intrinsic objects of traditional ASP.

Chapter 2, Web Forms, looks at the control-based programming model supported in ASP.NET called Web Forms. This chapter looks at the details of state retention across post-backs using both POST body data and ViewState, and describes how to effectively use server-side controls to create dynamic Web pages. The chapter concludes with a look at the various server-side controls available in ASP.NET.

Chapter 3, Configuration, describes the configuration model used by ASP.NET, starting with the XML format used by all configuration files and the hierarchical application of configuration settings. This chapter inspects several configuration elements in detail, including the processModel and appSettings elements. The chapter concludes by demonstrating two techniques for adding custom configuration sections to your configuration files.

Chapter 4, HTTP Pipeline, explores the details of the classes involved with servicing HTTP requests in ASP.NET. This chapter first walks through all the elements in the HTTP pipeline used to process a request, and then discusses the three points of extensibility in the pipeline: custom application classes, custom handlers, and custom modules. The chapter concludes with a discussion of threading and object pooling in the pipeline.

Chapter 5, Diagnostics and Error Handling, covers the new diagnostic features of ASP.NET, including page and application tracing as well as the new performance monitor counters. This chapter also discusses techniques for debugging ASP.NET applications and exception handling. The chapter concludes with a look at how to define custom error pages for your applications.

Chapter 6, Validation, describes the new validation architecture built into ASP.NET. This chapter begins by looking at how validation is performed in Web applications in general and proceeds to show how ASP.NET’s validation architecture provides a general solution to the problem of validating user input. The chapter includes a detailed look at how both client-side and server-side validation work, as well as a look at all the available validation controls.

Chapter 7, Data Binding, explores the process of binding server-side data to controls in an ASP.NET page. This chapter starts by explaining how data binding works with several different data sources, including collection classes, DataReaders, and DataSets, and then looks at how to bind data to several controls, including the DataGrid class. The chapter concludes with a look at templates and how to use them effectively with the Repeater, DataList, and DataGrid classes.

Chapter 8, Custom Controls, covers the fundamentals of building your own custom controls for use in ASP.NET applications. This chapter explains how custom controls are built, how to use the HtmlTextWriter class to achieve some browser independence, how to further support browser-independent rendering, how to define properties and subproperties, how to extract the inner content of a control’s tag, how to generate client-side script, and how to manage control state. The chapter also covers the details of building composite controls, user controls, controls that support validation, and controls that support data binding. The chapter concludes with a look at how to integrate your controls with the Visual Studio .NET designer.

Chapter 9, Caching, looks at both output caching and data caching in ASP.NET. This chapter discusses the mechanism of output caching and how to precisely control which versions of a page are placed in the cache, as well as how to cache portions of a page usi

Author Biography

Read more