Table Of ContentPro ASP.NET 1.1 in VB .NET
From Professional to Expert
LAURENCE MORONEY and
MATTHEW MACDONALD (Ed.)
K. SCOTT ALLEN
JAMES AVERY
RUSS BASIURA
MIKE BATONGBACAL
MARCO BELLINASO
MATT BUTLER
ANDREAS EIDE
DANIEL CAZZULINO
MICHAEL CLARK
RICHARD CONWAY
ROBERT EISENBERG
BRADY GASTER
JAMES GREENWOOD
KEVIN HOFFMAN
ERIK JOHANSSON
ANGELO KASTROULIS
DAN KENT
SITARAMAN LAKSHMINARAYANAN
DON LEE
CHRISTOPHER MILLER
MATT MILNER
JAN NARKIEWICZ
MATT ODHNER
RYAN O’KEEFE
ANDREW REID
MATTHEW REYNOLDS
ENRICO SABBADIN
BILL SEMPF
DOUG SEVEN
SRINIVASA SIVKUMAR
THIRU THANGARATHINAM
DOUG THEWS
Pro ASP.NET 1.1 in VB .NET: From Professional to Expert
Copyright © 2005 by Laurence Moroney,Matthew MacDonald (Ed.),K.Scott Allen,James Avery,
RussBasiura,Mike Batongbacal,Marco Bellinaso,Matt Butler,Andreas Eide,Daniel Cazzulino,
MichaelClark,Richard Conway,Robert Eisenberg,Brady Gaster,James Greenwood,Kevin Hoffman,
ErikJohansson,Angelo Kastroulis,Dan Kent,Sitaraman Lakshminarayanan,Don Lee,Christopher Miller,
Matt Milner,Jan Narkiewicz,Matt Odhner,Ryan O’Keefe,Andrew Reid,Matthew Reynolds,Enrico Sabbadin,
Bill Sempf,Doug Seven,Srinivasa Sivkumar,Thiru Thangarathinam,Doug Thews
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 (pbk): 1-59059-352-9
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.
Lead Editor: Tony Davis
Technical Reviewer: Damien Foggon
Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis,
JasonGilmore, Jonathan Hassell, Chris Mills, Dominic Shakeshaft, Jim Sumser
Production Director and Project Manager: Grace Wong
Copy Manager: Nicole LeClerc
Senior Copy Editor: Ami Knox
Production Manager: Kari Brooks-Copony
Production Editor: Katie Stence
Compositor: Dina Quan
Proofreader: Elizabeth Berry
Indexer: Kevin Broccoli
Artist: Kinetic Publishing Services, LLC
Cover Designer: Kurt Krames
Manufacturing Manager: Tom Debolski
Distributed to the book trade in the United States by Springer-Verlag New York, Inc., 233 Spring Street,
6thFloor, New York, NY 10013, and outside the United States by Springer-Verlag GmbH & Co. KG,
Tiergartenstr. 17, 69112 Heidelberg, Germany.
In the United States: phone 1-800-SPRINGER, fax 201-348-4505, e-mail [email protected], or visit
http://www.springer-ny.com. Outside the United States: fax +49 6221 345229, e-mail [email protected],
or visit http://www.springer.de.
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 [email protected], or visit http://www.apress.com.
The information in this book is distributed on an “as is” basis, without warranty. Although every precau-
tion 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 http://www.apress.comin the Downloads section.
You will need to answer questions pertaining to this book in order to successfully download the code.
This book is dedicated to my wife,Rebecca,and my wonderful children,
Claudia and Christopher.Thanks for giving me all the time that I need to put
into an endeavor like this and a life that makes everything worthwhile.
If only everybody could be as happy as I am when I am with you guys,
the world would be a much nicer place.You guys are the greatest!
It’s also dedicated to Lori Piquet,who gave me my first writing break by purchasing
my first article and continuing to work with me to improve my articles.
I have learned so much and owe so much to her.Thanks,Lori!
Contents at a Glance
About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
About the Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi
PART 1 ■ ■ ■ Core Concepts
CHAPTER 1 Introducing ASP.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
CHAPTER 2 Internet Information Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
CHAPTER 3 Visual Studio .NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
CHAPTER 4 The ASP.NET Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
CHAPTER 5 ASP.NET Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
CHAPTER 6 ASP.NET Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
CHAPTER 7 State Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
PART 2 ■ ■ ■ Data Access
CHAPTER 8 ADO.NET Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
CHAPTER 9 Disconnected Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
CHAPTER 10 Data Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
CHAPTER 11 Advanced ADO.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
CHAPTER 12 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
CHAPTER 13 Files and Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
iv
PART 3 ■ ■ ■ Security
CHAPTER 14 The ASP.NET Security Infrastructure . . . . . . . . . . . . . . . . . . . . . . . . . . 527
CHAPTER 15 Forms Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
CHAPTER 16 Windows Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
CHAPTER 17 Authorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
CHAPTER 18 Advanced Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
PART 4 ■ ■ ■ Advanced User Interface
CHAPTER 19 User Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651
CHAPTER 20 Custom Server Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
CHAPTER 21 Design-Time Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727
CHAPTER 22 JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757
CHAPTER 23 Dynamic Graphics with GDI+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785
PART 5 ■ ■ ■ Web Services
CHAPTER 24 Creating Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817
CHAPTER 25 Web Service Standards and Extensions . . . . . . . . . . . . . . . . . . . . . . . 867
CHAPTER 26 Advanced Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 909
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 941
v
Contents
About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
About the Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi
PART 1 ■ ■ ■ Core Concepts
■CHAPTER 1 Introducing ASP.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
The Evolution of Web Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Why Do We Need a New Version of ASP? . . . . . . . . . . . . . . . . . . . . . . . 4
Seven Important Facts about ASP.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.ASP.NET Is Integrated with the .NET Framework . . . . . . . . . . . . . . 7
2.ASP.NET Is Compiled,Not Interpreted . . . . . . . . . . . . . . . . . . . . . . . . 9
3.ASP.NET Is Multilanguage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.ASP.NET Runs Inside the Common Language Runtime . . . . . . . . 13
5.ASP.NET Is Multidevice and Multibrowser . . . . . . . . . . . . . . . . . . . 14
6.ASP.NET Is Object-Oriented . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7.ASP.NET Is Easy to Deploy and Configure . . . . . . . . . . . . . . . . . . . 15
A Quick Tour of ASP.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
HTML Server Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
ASP.NET Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Web Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Data-Bound Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
ASP.NET and Classic ASP Compared . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
vii
viii ■CONTENTS
■CHAPTER 2 Internet Information Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
The ASP.NET Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
The URL Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Processing Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Account Security with the Worker Process . . . . . . . . . . . . . . . . . . . . . 35
Process Recycling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The ASP.NET Execution Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Installing IIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Installing IIS 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Installing IIS 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Managing Websites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Creating a Virtual Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Virtual Directories and Web Applications . . . . . . . . . . . . . . . . . . . . . . 45
Folder Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Verifying the ASP.NET Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
■CHAPTER 3 Visual Studio .NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Understanding .NET Development Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
The .NET Compilers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
The Visual Studio .NET IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Creating a Website in Visual Studio .NET . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Visual Studio .NET and Virtual Directories . . . . . . . . . . . . . . . . . . . . . 56
Projects and Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Designing a Web Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
The Visual Studio .NET IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Solution Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Document Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Toolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Dynamic Help and Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Task List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Server Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
IntelliSense and Outlining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
The Code-Behind Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
How Code-Behind Files Are Connected to Pages . . . . . . . . . . . . . . . 76
How Control Tags Are Connected to Page Variables . . . . . . . . . . . . . 77
How Events Are Connected to Event Handlers . . . . . . . . . . . . . . . . . . 78
Project Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
■CONTENTS ix
Visual Studio .NET Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Single-Step Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Variable Watches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Resource Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Debugging Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Extending Visual Studio .NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Creating Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Extending Dynamic Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Customizing VS .NET Using Template Policy . . . . . . . . . . . . . . . . . . . 90
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
■CHAPTER 4 The ASP.NET Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Page Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
HTML Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Dynamic Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
The ASP.NET Event Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Automatic Postbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
View State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Web Forms Processing Stages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Page Framework Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
User Code Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Event Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Cleanup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
A Page Flow Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
The Page as a Control Container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Showing the Control Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Dynamic Control Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
The Page Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Session,Application,and Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Accessing the HTTP Context in Another Class . . . . . . . . . . . . . . . . . 129
Script Injection Attacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Request Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Disabling Request Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
x ■CONTENTS
■CHAPTER 5 ASP.NET Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
ASP.NET Server Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
The Server Control Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
HTML Server Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
The HtmlControl Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
The HtmlContainerControl Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
The HtmlInputControl Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
The HTML Server Control Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Setting Style Attributes and Other Properties . . . . . . . . . . . . . . . . . . 139
Programmatically Creating Server Controls . . . . . . . . . . . . . . . . . . . 141
Handling Server-Side Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
ASP.NET Web Form Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
The WebControl Base Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Basic Web Control Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Enumerated Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Handling Web Control Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
The ASP.NET List Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
The ListControl Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Using the ASP.NET List Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
The ASP.NET Input Validation Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
The Validation Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
The Validation Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
The BaseValidator Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
The RequiredFieldValidator Control . . . . . . . . . . . . . . . . . . . . . . . . . . 165
The RangeValidator Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
The CompareValidator Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
The RegularExpressionValidator Control . . . . . . . . . . . . . . . . . . . . . . 167
The CustomValidator Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
The ValidationSummary Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Using the Validators Programmatically . . . . . . . . . . . . . . . . . . . . . . . 172
The ASP.NET Rich Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
The Calendar Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
The AdRotator Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
The Xml Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Description:Pro ASP .NET in VB .NET is the core title in the new Apress ASP.NET book strategy. An all-in-one reference for seasoned ASP.NET developers, it is the successor to Professional ASP.NET which has been reprinted. Updated and written new in places, this will be the seasoned latecomer to the Microsoft