Home > Store

ASP.NET 2.0 Illustrated

Register your product to gain access to bonus material or receive a coupon.

ASP.NET 2.0 Illustrated

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2006
  • Dimensions: 7" x 9-1/4"
  • Pages: 800
  • Edition: 1st
  • Book
  • ISBN-10: 0-321-41834-4
  • ISBN-13: 978-0-321-41834-0

“This book is a phenomenal start for someone new to ASP.NET, as well as a complete guide to the new features of version 2.0 for programmers familiar with an earlier version. The beginning chapters detail concepts using a hypothetical company, examining the myriad sorts of requests and situations often requested by clients. The authors deal with these in an eloquent, realistic manner. They have clearly worked in the industry and have faced real-world challenges that programmers encounter daily. The content covers everything from the most basic tasks to the most complex, and is a comprehensive collection of information on ASP.NET 2.0. Every topic is well-referenced for additional information, but contains clear examples that work. The content is technical but the clear writing makes it easy to understand. Difficult concepts are explained in such a way that this book will quickly become your favorite reference for ASP.NET!”
—Ronda Pederson, consultant, Microsoft MVP Visual Developer, ASP/ASP.NET
“As to be expected from two of today’s leading technical authors, this book is a cracking guide to getting the most from the ASP 2.0 Framework. Detailed chapters, concise yet practical examples, and clear explanation provide the grounding and support necessary to leverage the new features that ASP 2.0 brings to the table—all explained with a logical, no-nonsense approach. This book will be borrowed by every developer you work with, so guard it wisely!”
—John Timney, Microsoft MVP, senior Web services consultant, British Telecom
“This book will absolutely change the way you view ASP.NET technology. Read it and your existing Web sites will suddenly appear to be underperforming.”
—Chris Carpenter, senior software engineer, L3 Communications, Inc.
“The authors have worked closely with the ASP.NET team at Microsoft to makesure that this book is authoritative, accurate, and informative. Anyone usingASP.NET will find a wealth of useful information on ASP.NET 2.0.”
—Scott Guthrie, general manager, .NET Developer Platform, Microsoft Corporation

Developers moving to ASP.NET 2.0, the breakthrough Web development environment from Microsoft, will want to learn how to take full advantage of the new features that make this the most productive and powerful Web development environment ever. ASP.NET 2.0 Illustrated teaches developers exactly what they need to know to create exciting Web sites and applications quickly and easily using ASP.NET 2.0.

Renowned authors, developers, and conference speakers Alex Homer and Dave Sussman have written a concise, detailed exploration of the “must learn” features of ASP.NET 2.0. The book’s many original examples, fully updated for the release version of ASP.NET 2.0, are all downloadable from the authors’ Web site, and many can be run live online.

The authors provide detailed coverage of

  • Connecting to databases, using data source and data display controls with SQL statements and stored procedures; creating business layers and data layers with custom classes and Typed DataSets; and providing declarative access to business and data layers
  • Techniques for improving the scalability and responsiveness of data-driven sites, including caching techniques for data and ASP.NET pages
  • Binding to XML, transforming XML, updating XML data, and managing XML data stored in SQL Server 2005
  • Building interactive Web forms with a wide variety of ASP.NET controls
  • Understanding and using the core functionality of the Page class and key .NET Framework classes
  • Providing a consistent sitewide look and feel using Master Pages
  • Six ways to provide site navigation, including the new navigation controls
  • Securing sites and implementing membership and roles
  • Using profiles, personalization, and themes in your applications
  • Building user-customizable Web portals with Web Parts
  • Supporting multiple browsers, disabled users, mobile devices, and international users
  • Creating and consuming Web services

Developers will come away from this book knowing exactly how to build secure, efficient, visually consistent, easy-to-navigate, data-driven Web sites with ASP.NET 2.0.



Sample Content

Online Sample Chapter

ASP.NET 2.0: Is It Really This Easy?

Downloadable Sample Chapter

Download the Sample Chapter from this book.

Table of Contents

Figures xix

Tables xxix

Preface xxxi

Acknowledgments xxxiii

About the Authors xxxv

 

1. Technology, Tools, and Getting Started 1

New Features of ASP.NET 2.0 2

Changes from Version 1.x 19

Obtaining and Installing .NET 2.0 19

Upgrading and Deploying Applications 21

Installing the Samples 21

Summary 22

2 Is It Really This Easy? 23

A Day in the Life of a Developer 24

Summary 52

3 Data Source and Data Display Controls 53

Databases and Connections 54

Data Source Controls 59

Data Display and Edit Controls 72

Summary 104

4 Data Binding to Business Objects 105

Two- and Three-Tier Architecture 106

The ObjectDataSource Control 113

Typed Data Sets 122

Summary 131

5 Advanced Data and Page Techniques 133

DataSource Control Events 134

GridView and DetailsView Events 144

Handling Data Editing Conflicts 145

SQL Server 2005 User-De*ned Types 159

Additions to UDTs 168

Summary 176

6 Data and Output Caching 177

Application, Session, HttpContext, and ViewState Caching 178

Output Caching 185

Data Caching 195

The Cache API 210

When to Use Caching 216

Summary 218

7 Working with XML 219

Working with XML in Visual Studio 2005 220

Databinding and Displaying XML Data 222

Transforming XML 230

Working with Raw XML 236

Converting between XML and Relational Data 247

Working with SQL Server 2005 XML Data 248

Summary 255

8 Building Interactive Web Forms 257

The ASP.NET Control Set 258

The ASP.NET Page and Postback Model 306

Summary 308

9 The Page Class and Master Pages 309

The HttpRequest, HttpResponse, HttpServerUtility, and HttpContext Classes 310

The ASP.NET Page Class 319

Sub-Classing the Page Object 343

Working with Master Pages 344

Summary 351

10 Web Site Navigation Techniques 353

Simple Navigation with Hyperlinks 354

Navigation with LinkButton Controls 358

Navigation through Browser Redirection 366

Navigation through Server-Side Redirection 369

Cross-Page Posting of Form Contents 377

Site Maps, Menus, and Navigation Path Controls 381

Summary 393

11 Security and Membership 395

Preventing Anonymous Access to Web Sites 396

ASP.NET Membership Provider and Role Manager 408

The ASP.NET Web Site Administration Tool 414

The ASP.NET Security Server Controls 441

Accessing the Membership and Roles Features in Code 451

Summary 457

12 Profiles, Personalization, and Themes 459

Configuring Profiles and Personalization 460

Storing and Using Dynamic Profile Data 471

A Simple Example of Using a Shopping Cart 474

Using Themes to Personalize Your Site 487

Summary 503

13 Building Web Portals 505

The ASP.NET 2.0 Portal Framework 506

The WebPart Manager 509

WebParts and Authorization 512

Zones and WebParts 513

Catalog Zones 523

Editor Zones 525

Connecting WebParts Together 533

Summary 545

14 Usability, Accessibility, Mobile Devices, Localization 547

Page Validation, Browser Capabilities, and Alternative Content 548

Making Your Pages Easier to Use 559

Supporting Disabled Users and Specialist User Agents 562

Building Pages for Small-Screen and Mobile Devices 587

Supporting Localization and Multiple Languages 600

Summary 616

15 Using the Framework Classes 619

The Example Application 620

Storing Data with the System.Collections Classes 628

Reading, Writing, and Compressing Data with the System.IO Classes 638

Creating Graphics and Images with the System.Drawing Classes 652

Accessing the Internet with the System.Net Classes 656

Accessing Active Directory with the System.DirectoryServices Classes 669

Encrypting Data with the System.Security.Cryptography Classes 673

Summary 678

16 Web Services 679

Web Services 680

Creating Web Services 681

Consuming Web Services 690

Controlling How Data Is Transferred in Web Services 694

Web Service Enhancements 701

The Future of Web Services 708

Summary 708

Index 711

Preface

It was late in the afternoon on a cold and rainy day in 1996 as we sat in the office in Birmingham, England, staring at a blank page in Internet Explorer 3 and wondering when the old Gateway 386 server under the desk would finally finish grinding through a dbWeb query and produce some results. The e-mail, from a small offshoot of the IIS team at Microsoft, arrived as we waited, asking if we would be interested in looking at a new product ("still under development") called Denali. Why not? It seemed that the case study for the final chapter of our book on Web site and database integration was going nowhere.

So we installed Denali 0.9 and started to play with it. Somewhere about ten in the evening, blown away by what we were seeing, the decision was made. The final chapter of the book would be a preview of this amazing new technology—released to the public some months later as Active Server Pages. Little did we realize then that this one event would determine the direction of our future writing career, right up to the current day.

What is remarkable, comparing ASP 1.0 with the current ASP.NET 2.0 release, is how much has changed in the past ten years. Our first book about ASP included the history of the Internet, a comprehensive reference to HTML 3.2 and a new styling language called CSS, a full tutorial on VBScript, plusdescriptions and examples of every object, method, and property of ASP and its associated database access technology, called ActiveX Data Objects. We even had room in the 1,000 or so pages to cover the SQL language, using MTS and MSMQ, building COM components, a few case studies, and a raft of appendices.

Now, with ASP.NET, we could fill 1,000 pages just describing server controls. ASP.NET has grown up to become a fully fledged, rich, and all-encompassing language-agnostic technology suitable for building any type of Web-based application. Covering all of ASP.NET 2.0 and the associated .NET Framework classes to the same level of detail as our first book on Active Server Pages would fill a whole shelf in your bookcase!

Instead, this book aims to provide you with the concise and detailed information on ASP.NET 2.0 that you need to build great Web sites and Web-based applications. We've attempted to share with you our passion for ASP.NET, our experience of working with it over many years, and our long and fruitful relationship with the team at Microsoft. We hope that you, too, will develop the same passion for ASP.NET as we have.

What Do I Need to Use This Book?
This book is aimed at developers who are reasonably familiar with the Web, HTML, CSS, JavaScript, and the C# language. We have tried to avoid using code or concepts that are obscure or unduly complex, instead concentrating on the techniques and technologies in ASP.NET 2.0.

The examples were developed in Visual Studio 2005, though you can use Visual Web Developer (VWD) if you only have this available. You will also need access to a database—either SQL Server 2005 or SQL Server Express Edition as installed with Visual Studio 2005 and VWD. You can download the examples, and run many of them online, from our server at http://www.daveandal.net/books/8344/. Alternatively, you can obtain the samples from the Addison-Wesley Web site at http://www.awprofessional.com/msdotnetseries.

Index

Download the Index file from this book.

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020