Beginning ASP.NET 2.0
in C# 2005
From Novice to Professional
■■■
Matthew MacDonald
MacDonald.book Page i Friday, December 30, 2005 12:59 PM
Beginning ASP.NET 2.0 in C# 2005: From Novice to Professional
Copyright © 2006 by Matthew MacDonald
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN-13 (pbk): 978-1-59059-572-5
ISBN-10 (pbk): 1-59059-572-6
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Contributor of Chapter 27: Julian Templeman
Lead Editor: Jonathan Hassell
Technical Reviewer: Ronald Landers
Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan
Hassell, Chris Mills, Dominic Shakeshaft, Jim Sumser
Project Manager and Production Director: Grace Wong
Copy Edit Manager: Nicole LeClerc
Copy Editor: Kim Wimpsett
Assistant Production Director: Kari Brooks-Copony
Production Editor: Kelly Winquist
Compositor: Pat Christenson
Proofreader: Nancy Riddiough
Indexer: Michael Brinkman
Artist: Kinetic Publishing Services, LLC
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail `cUVcd_j1dacZ_XVcdS^T`^, or
visit Yeea+ hhhdacZ_XVc`_]Z_VT`^.
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA
94710. Phone 510-549-5930, fax 510-549-5939, e-mail Z_W`1RacVddT`^, or visit Yeea+ hhhRacVddT`^.
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution
has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to
any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly
by the information contained in this work.
The source code for this book is available to readers at Yeea+ hhhRacVddT`^ in the Source Code section.
You will need to answer questions pertaining to this book in order to successfully download the code.
MacDonald.book Page ii Friday, December 30, 2005 12:59 PM
For my loving wife, Faria
MacDonald.book Page iii Friday, December 30, 2005 12:59 PM
iv
Contents at a Glance
About the Author
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi
About the Technical Reviewer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
Acknowledgments
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xxviii
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
PART 1
■ ■ ■
Introducing .NET
■
CHAPTER 1 Introducing the .NET Framework. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
■
CHAPTER 2 Learning the C# Language. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
■
CHAPTER 3 Types, Objects, and Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
■
CHAPTER 4 Introducing Visual Studio 2005. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
PART 2
■ ■ ■
Developing ASP.NET Applications
■
CHAPTER 5 Web Form Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
■
CHAPTER 6 Web Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
■
CHAPTER 7 Tracing, Logging, and Error Handling. . . . . . . . . . . . . . . . . . . . . . . . . 219
■
CHAPTER 8 Validation and Rich Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
■
CHAPTER 9 State Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
■
CHAPTER 10 Master Pages and Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
■
CHAPTER 11 Website Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
■
CHAPTER 12 Deploying ASP.NET Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
PART 3
■ ■ ■
Working with Data
■
CHAPTER 13 ADO.NET Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
■
CHAPTER 14 Data Binding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
■
CHAPTER 15 The Data Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581
■
CHAPTER 16 Files and Streams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
■
CHAPTER 17 XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
MacDonald.book Page iv Friday, December 30, 2005 12:59 PM
评论8
最新资源