Tải bản đầy đủ (.pdf) (1,369 trang)

ASPDotNETInAN ASPdot net in a nutshell

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (5.58 MB, 1,369 trang )

This document is created with a trial version of CHM2PDF Pilot


[ Team LiB ]








Table of Contents
Index
Reviews
Examples
Reader Reviews
Errata

ASP.NET in a Nutshell, 2nd Edition
By G. Andrew Duthie, Matthew MacDonald
Publisher: O'Reilly
Pub Date: August 2003
ISBN: 0-596-00520-2
Pages: 998

Newly updated for Visual Studio .NET 2003, the second edition of this book includes fresh information on application
and web service development, custom controls, data access, security, deployment, and error handling, new material on
web application development for mobile devices, plus an overview of the class libraries.

[ Team LiB ]




This document is created with a trial version of CHM2PDF Pilot


[ Team LiB ]








Table of Contents
Index
Reviews
Examples
Reader Reviews
Errata

ASP.NET in a Nutshell, 2nd Edition
By G. Andrew Duthie, Matthew MacDonald
Publisher: O'Reilly
Pub Date: August 2003
ISBN: 0-596-00520-2
Pages: 998

Copyright
Preface

Who Is This Book for?
How to Use This Book
How This Book Is Structured
Conventions Used in This Book
How to Contact Us
Acknowledgments
Part I: Introduction to ASP.NET
Chapter 1. Introduction
Section 1.1. .NET Platform Fundamentals
Section 1.2. Object Orientation in the .NET Platform
Section 1.3. Choosing a Language
Section 1.4. Why and When Would I Use ASP.NET?
Section 1.5. Why and When Would I Port an Existing Application to ASP.NET?
Section 1.6. New Features in ASP.NET
Chapter 2. ASP.NET Applications
Section 2.1. Application Types
Section 2.2. Application Structure and Boundaries
Section 2.3. Application File Types
Chapter 3. Web Forms
Section 3.1. Structuring an ASP.NET Page
Section 3.2. Stages of Page Processing


This document is created with a trial version of CHM2PDF Pilot

Section 3.3. State Management
Section 3.4. Caching Page Output
Section 3.5. Additional Resources
Chapter 4. Web Services
Section 4.1. Standards and Specifications

Section 4.2. Web Services Architecture
Section 4.3. Creating a Web Service
Section 4.4. Consuming a Web Service
Section 4.5. Additional Resources
Chapter 5. ASP.NET Server Controls
Section 5.1. HTML Controls
Section 5.2. Web Controls
Section 5.3. Using Controls
Section 5.4. Types of Web Controls
Section 5.5. Handling Control Events
Section 5.6. Modifying Control Appearance
Section 5.7. Additional Resources
Chapter 6. User Controls and Custom Server Controls
Section 6.1. User Controls
Section 6.2. Custom Server Controls
Section 6.3. Sharing Controls Across Applications
Section 6.4. Additional Resources
Chapter 7. Data Access and Data Binding
Section 7.1. ADO.NET: An Overview
Section 7.2. Reading Data
Section 7.3. Data Binding
Section 7.4. Inserting and Updating Data
Section 7.5. Deleting Data
Section 7.6. Additional Resources
Chapter 8. ASP.NET Configuration
Section 8.1. Understanding Configuration Files
Section 8.2. Modifying Configuration Settings
Section 8.3. Locking Down Configuration Settings
Section 8.4. Targeting a Specific Runtime Version
Section 8.5. Additional Resources

Chapter 9. ASP.NET Security
Section 9.1. Authentication Methods
Section 9.2. Authorization
Section 9.3. Ensuring Input Safety
Section 9.4. Patching
Section 9.5. Code Access Security
Section 9.6. Additional Resources
Chapter 10. Error Handling, Debugging, and Tracing
Section 10.1. Error Handling
Section 10.2. Debugging
Section 10.3. Tracing
Section 10.4. Additional Resources
Chapter 11. ASP.NET Deployment
Section 11.1. Deploying ASP.NET Applications
Section 11.2. Deploying Assemblies
Section 11.3. Deploying Through Visual Studio .NET
Section 11.4. Additional Resources


This document is created with a trial version of CHM2PDF Pilot

Part II: Intrinsic Class Reference
Chapter 12. The Page Class
Section 12.1. Comments/Troubleshooting
Section 12.2. Properties Reference
Section 12.3. Collections Reference
Section 12.4. Methods Reference
Section 12.5. Events Reference
Chapter 13. The HttpApplicationState Class
Section 13.1. Comments/Troubleshooting

Section 13.2. Properties Reference
Section 13.3. Collections Reference
Section 13.4. Methods Reference
Section 13.5. Events Reference
Chapter 14. The HttpContext Class
Section 14.1. Comments/Troubleshooting
Section 14.2. Properties Reference
Section 14.3. Collections Reference
Section 14.4. Methods Reference
Chapter 15. The HttpException Class
Section 15.1. Comments/Troubleshooting
Section 15.2. Constructor Reference
Section 15.3. Properties Reference
Section 15.4. Methods Reference
Chapter 16. The HttpRequest Class
Section 16.1. Comments/Troubleshooting
Section 16.2. Properties Reference
Section 16.3. Collections Reference
Section 16.4. Methods Reference
Chapter 17. The HttpResponse Class
Section 17.1. Comments/Troubleshooting
Section 17.2. Properties Reference
Section 17.3. Collections Reference
Section 17.4. Methods Reference
Chapter 18. The HttpServerUtility Class
Section 18.1. Comments/Troubleshooting
Section 18.2. Properties Reference
Section 18.3. Methods Reference
Chapter 19. The HttpSessionState Class
Section 19.1. Comments/Troubleshooting

Section 19.2. Properties Reference
Section 19.3. Collections Reference
Section 19.4. Methods Reference
Section 19.5. Events Reference
Chapter 20. web.config Reference
Section 20.1. Comments/Troubleshooting
Section 20.2. web.config Elements
Part III: Namespace Reference
Chapter 21. Namespace Reference
Section 21.1. Reading a Quick-Reference Entry
Chapter 22. Converting from C# to VB Syntax
Section 22.1. General Considerations
Section 22.2. Classes


This document is created with a trial version of CHM2PDF Pilot

Section 22.3.
Section 22.4.
Section 22.5.
Section 22.6.
Section 22.7.

Structures
Interfaces
Class, Structure, and Interface Members
Delegates
Enumerations

Chapter 23. The System.Web Namespace

AspNetHostingPermission
AspNetHostingPermissionAttribute
AspNetHostingPermissionLevel
BeginEventHandler
EndEventHandler
HttpApplication
HttpApplicationState
HttpBrowserCapabilities
HttpCacheability
HttpCachePolicy
HttpCacheRevalidation
HttpCacheValidateHandler
HttpCacheVaryByHeaders
HttpCacheVaryByParams
HttpClientCertificate
HttpCompileException
HttpContext
HttpCookie
HttpCookieCollection
HttpException
HttpFileCollection
HttpModuleCollection
HttpParseException
HttpPostedFile
HttpRequest
HttpRequestValidationException
HttpResponse
HttpRuntime
HttpServerUtility
HttpStaticObjectsCollection

HttpUnhandledException
HttpUtility
HttpValidationStatus
HttpWorkerRequest
HttpWorkerRequest.EndOfSendNotification
HttpWriter
IHttpAsyncHandler
IHttpHandler
IHttpHandlerFactory
IHttpModule
ProcessInfo
ProcessModelInfo
ProcessShutdownReason
ProcessStatus
TraceContext
TraceMode


This document is created with a trial version of CHM2PDF Pilot

Chapter 24. The System.Web.Caching Namespace
Cache
CacheDependency
CacheItemPriority
CacheItemRemovedCallback
CacheItemRemovedReason
Chapter 25. The System.Web.Configuration Namespace
AuthenticationMode
ClientTargetSectionHandler
FormsAuthPasswordFormat

FormsProtectionEnum
HttpCapabilitiesBase
HttpConfigurationContext
Chapter 26. The System.Web.Hosting Namespace
AppDomainFactory
ApplicationHost
IAppDomainFactory
IISAPIRuntime
ISAPIRuntime
SimpleWorkerRequest
Chapter 27. The System.Web.Mail Namespace
MailAttachment
MailEncoding
MailFormat
MailMessage
MailPriority
SmtpMail
Chapter 28. The System.Web.Mobile Namespace
CookielessData
ErrorHandlerModule
MobileCapabilities
MobileDeviceCapabilitiesSectionHandler
MobileErrorInfo
MobileFormsAuthentication
Chapter 29. The System.Web.Security Namespace
DefaultAuthenticationEventArgs
DefaultAuthenticationEventHandler
DefaultAuthenticationModule
FileAuthorizationModule
FormsAuthentication

FormsAuthenticationEventArgs
FormsAuthenticationEventHandler
FormsAuthenticationModule
FormsAuthenticationTicket
FormsIdentity
PassportAuthenticationEventArgs
PassportAuthenticationEventHandler
PassportAuthenticationModule
PassportIdentity
UrlAuthorizationModule
WindowsAuthenticationEventArgs
WindowsAuthenticationEventHandler


This document is created with a trial version of CHM2PDF Pilot

WindowsAuthenticationModule
Chapter 30. The System.Web.Services Namespace
WebMethodAttribute
WebService
WebServiceAttribute
WebServiceBindingAttribute
Chapter 31. The System.Web.Services.Configuration Namespace
XmlFormatExtensionAttribute
XmlFormatExtensionPointAttribute
XmlFormatExtensionPrefixAttribute
Chapter 32. The System.Web.Services.Description Namespace
Binding
BindingCollection
DocumentableItem

FaultBinding
FaultBindingCollection
HttpAddressBinding
HttpBinding
HttpOperationBinding
HttpUrlEncodedBinding
HttpUrlReplacementBinding
Import
ImportCollection
InputBinding
Message
MessageBinding
MessageCollection
MessagePart
MessagePartCollection
MimeContentBinding
MimeMultipartRelatedBinding
MimePart
MimePartCollection
MimeTextBinding
MimeTextMatch
MimeTextMatchCollection
MimeXmlBinding
Operation
OperationBinding
OperationBindingCollection
OperationCollection
OperationFault
OperationFaultCollection
OperationFlow

OperationInput
OperationMessage
OperationMessageCollection
OperationOutput
OutputBinding
Port
PortCollection
PortType


This document is created with a trial version of CHM2PDF Pilot

PortTypeCollection
ProtocolImporter
ProtocolReflector
Service
ServiceCollection
ServiceDescription
ServiceDescriptionBaseCollection
ServiceDescriptionCollection
ServiceDescriptionFormatExtension
ServiceDescriptionFormatExtensionCollection
ServiceDescriptionImporter
ServiceDescriptionImportStyle
ServiceDescriptionImportWarnings
ServiceDescriptionReflector
SoapAddressBinding
SoapBinding
SoapBindingStyle
SoapBindingUse

SoapBodyBinding
SoapExtensionImporter
SoapExtensionReflector
SoapFaultBinding
SoapHeaderBinding
SoapHeaderFaultBinding
SoapOperationBinding
SoapProtocolImporter
SoapTransportImporter
Types
Chapter 33. The System.Web.Services.Discovery Namespace
ContractReference
ContractSearchPattern
DiscoveryClientDocumentCollection
DiscoveryClientProtocol
DiscoveryClientProtocol.DiscoveryClientResultsFile
DiscoveryClientReferenceCollection
DiscoveryClientResult
DiscoveryClientResultCollection
DiscoveryDocument
DiscoveryDocumentLinksPattern
DiscoveryDocumentReference
DiscoveryDocumentSearchPattern
DiscoveryExceptionDictionary
DiscoveryReference
DiscoveryReferenceCollection
DiscoveryRequestHandler
DiscoverySearchPattern
DynamicDiscoveryDocument
ExcludePathInfo

SchemaReference
SoapBinding
XmlSchemaSearchPattern
Chapter 34. The System.Web.Services.Protocols Namespace


This document is created with a trial version of CHM2PDF Pilot

AnyReturnReader
HtmlFormParameterReader
HtmlFormParameterWriter
HttpGetClientProtocol
HttpMethodAttribute
HttpPostClientProtocol
HttpSimpleClientProtocol
HttpWebClientProtocol
LogicalMethodInfo
LogicalMethodTypes
MatchAttribute
MimeFormatter
MimeParameterReader
MimeParameterWriter
MimeReturnReader
NopReturnReader
PatternMatcher
SoapClientMessage
SoapDocumentMethodAttribute
SoapDocumentServiceAttribute
SoapException
SoapExtension

SoapExtensionAttribute
SoapHeader
SoapHeaderAttribute
SoapHeaderCollection
SoapHeaderDirection
SoapHeaderException
SoapHttpClientProtocol
SoapMessage
SoapMessageStage
SoapParameterStyle
SoapRpcMethodAttribute
SoapRpcServiceAttribute
SoapServerMessage
SoapServiceRoutingStyle
SoapUnknownHeader
TextReturnReader
UrlEncodedParameterWriter
UrlParameterReader
UrlParameterWriter
ValueCollectionParameterReader
WebClientAsyncResult
WebClientProtocol
WebServiceHandlerFactory
XmlReturnReader
Chapter 35. The System.Web.SessionState Namespace
HttpSessionState
IReadOnlySessionState
IRequiresSessionState
IStateRuntime
SessionStateMode

SessionStateModule


This document is created with a trial version of CHM2PDF Pilot

SessionStateModule
SessionStateSectionHandler
StateRuntime
Chapter 36. The System.Web.UI Namespace
AttributeCollection
BaseParser
BasePartialCachingControl
BuildMethod
BuildTemplateMethod
CompiledTemplateBuilder
ConstructorNeedsTagAttribute
Control
ControlBuilder
ControlBuilderAttribute
ControlCollection
CssStyleCollection
DataBinder
DataBinding
DataBindingCollection
DataBindingHandlerAttribute
DataBoundLiteralControl
DesignerDataBoundLiteralControl
DesignTimeParseData
DesignTimeTemplateParser
EmptyControlCollection

Html32TextWriter
HtmlTextWriter
HtmlTextWriterAttribute
HtmlTextWriterStyle
HtmlTextWriterTag
IAttributeAccessor
IDataBindingsAccessor
ImageClickEventArgs
ImageClickEventHandler
INamingContainer
IParserAccessor
IPostBackDataHandler
IPostBackEventHandler
IStateManager
ITagNameToTypeMapper
ITemplate
IUserControlDesignerAccessor
IValidator
LiteralControl
LosFormatter
ObjectConverter
ObjectTagBuilder
OutputCacheLocation
Page
PageParser
Pair
ParseChildrenAttribute
PartialCachingAttribute



This document is created with a trial version of CHM2PDF Pilot

PartialCachingControl
PersistChildrenAttribute
PersistenceMode
PersistenceModeAttribute
PropertyConverter
RenderMethod
RootBuilder
SimpleWebHandlerParser
StateBag
StateItem
StaticPartialCachingControl
TagPrefixAttribute
TemplateBuilder
TemplateContainerAttribute
TemplateControl
TemplateControlParser
TemplateParser
ToolboxDataAttribute
Triplet
UserControl
UserControlControlBuilder
ValidationPropertyAttribute
ValidatorCollection
WebServiceParser
Chapter 37. The System.Web.UI.Design Namespace
CalendarDataBindingHandler
ColorBuilder
ControlDesigner

ControlParser
ControlPersister
DataBindingCollectionConverter
DataBindingCollectionEditor
DataBindingHandler
DataBindingValueUIHandler
DataFieldConverter
DataMemberConverter
DataSourceConverter
DesignTimeData
HtmlControlDesigner
HtmlIntrinsicControlDesigner
HyperLinkDataBindingHandler
IControlDesignerBehavior
IDataSourceProvider
IHtmlControlDesignerBehavior
ImageUrlEditor
ITemplateEditingFrame
ITemplateEditingService
IWebFormReferenceManager
IWebFormsBuilderUIService
IWebFormsDocumentService
ReadWriteControlDesigner
TemplatedControlDesigner
TemplateEditingService


This document is created with a trial version of CHM2PDF Pilot

TemplateEditingService

TemplateEditingVerb
TextControlDesigner
TextDataBindingHandler
UrlBuilder
UrlBuilderOptions
UrlEditor
UserControlDesigner
WebControlToolboxItem
XmlFileEditor
XmlUrlEditor
XslUrlEditor
Chapter 38. The System.Web.UI.Design.WebControls Namespace
AdRotatorDesigner
BaseDataListComponentEditor
BaseDataListDesigner
BaseValidatorDesigner
ButtonDesigner
CalendarAutoFormatDialog
CalendarDesigner
CheckBoxDesigner
DataGridColumnCollectionEditor
DataGridComponentEditor
DataGridDesigner
DataListComponentEditor
DataListDesigner
HyperLinkDesigner
LabelDesigner
LinkButtonDesigner
ListControlDataBindingHandler
ListControlDesigner

ListItemsCollectionEditor
PanelDesigner
RegexEditorDialog
RegexTypeEditor
RepeaterDesigner
TableCellsCollectionEditor
TableDesigner
TableRowsCollectionEditor
XmlDesigner
Chapter 39. The System.Web.UI.HtmlControls Namespace
HtmlAnchor
HtmlButton
HtmlContainerControl
HtmlControl
HtmlForm
HtmlGenericControl
HtmlImage
HtmlInputButton
HtmlInputCheckBox
HtmlInputControl
HtmlInputFile
HtmlInputHidden


This document is created with a trial version of CHM2PDF Pilot

HtmlInputImage
HtmlInputRadioButton
HtmlInputText
HtmlSelect

HtmlTable
HtmlTableCell
HtmlTableCellCollection
HtmlTableRow
HtmlTableRowCollection
HtmlTextArea
Chapter 40. The System.Web.UI.MobileControls Namespace
AdRotator
Alignment
ArrayListCollectionBase
BaseValidator
BooleanOption
Calendar
Command
CommandFormat
CompareValidator
Constants
ControlPager
CustomValidator
DesignerAdapterAttribute
DeviceOverridableAttribute
DeviceSpecific
DeviceSpecificChoice
DeviceSpecificChoiceCollection
DeviceSpecificChoiceControlBuilder
DeviceSpecificChoiceTemplateBuilder
DeviceSpecificChoiceTemplateContainer
DeviceSpecificControlBuilder
ErrorFormatterPage
FontInfo

FontSize
Form
FormControlBuilder
FormMethod
IControlAdapter
Image
IObjectListFieldCollection
IPageAdapter
ItemPager
ITemplateable
Label
Link
List
ListCommandEventArgs
ListCommandEventHandler
ListControlBuilder
ListDataBindEventArgs
ListDataBindEventHandler
ListDecoration


This document is created with a trial version of CHM2PDF Pilot

ListDecoration
ListSelectType
LiteralLink
LiteralText
LiteralTextContainerControlBuilder
LiteralTextControlBuilder
LoadItemsEventArgs

LoadItemsEventHandler
MobileControl
MobileControlBuilder
MobileControlsSectionHandler
MobileListItem
MobileListItemCollection
MobileListItemType
MobilePage
MobileUserControl
ObjectList
ObjectListCommand
ObjectListCommandCollection
ObjectListCommandEventArgs
ObjectListCommandEventHandler
ObjectListControlBuilder
ObjectListDataBindEventArgs
ObjectListDataBindEventHandler
ObjectListField
ObjectListFieldCollection
ObjectListItem
ObjectListItemCollection
ObjectListSelectEventArgs
ObjectListSelectEventHandler
ObjectListShowCommandsEventArgs
ObjectListShowCommandsEventHandler
ObjectListTitleAttribute
ObjectListViewMode
PagedControl
PagerStyle
Panel

PanelControlBuilder
PersistNameAttribute
PhoneCall
RangeValidator
RegularExpressionValidator
RequiredFieldValidator
SelectionList
Style
StyleSheet
StyleSheetControlBuilder
TemplateContainer
TextBox
TextBoxControlBuilder
TextControl
TextView
TextViewElement


This document is created with a trial version of CHM2PDF Pilot

ValidationSummary
Wrapping
Chapter 41. The System.Web.UI.MobileControls.Adapters Namespace
ChtmlCalendarAdapter
ChtmlCommandAdapter
ChtmlFormAdapter
ChtmlImageAdapter
ChtmlLinkAdapter
ChtmlMobileTextWriter
ChtmlPageAdapter

ChtmlPhoneCallAdapter
ChtmlSelectionListAdapter
ChtmlTextBoxAdapter
ControlAdapter
HtmlCalendarAdapter
HtmlCommandAdapter
HtmlControlAdapter
HtmlFormAdapter
HtmlImageAdapter
HtmlLabelAdapter
HtmlLinkAdapter
HtmlListAdapter
HtmlLiteralTextAdapter
HtmlMobileTextWriter
HtmlObjectListAdapter
HtmlPageAdapter
HtmlPanelAdapter
HtmlPhoneCallAdapter
HtmlSelectionListAdapter
HtmlTextBoxAdapter
HtmlTextViewAdapter
HtmlValidationSummaryAdapter
HtmlValidatorAdapter
MobileTextWriter
MultiPartWriter
UpWmlMobileTextWriter
UpWmlPageAdapter
WmlCalendarAdapter
WmlCommandAdapter
WmlControlAdapter

WmlFormAdapter
WmlImageAdapter
WmlLabelAdapter
WmlLinkAdapter
WmlListAdapter
WmlLiteralTextAdapter
WmlMobileTextWriter
WmlObjectListAdapter
WmlPageAdapter
WmlPanelAdapter
WmlPhoneCallAdapter
WmlSelectionListAdapter
WmlTextBoxAdapter


This document is created with a trial version of CHM2PDF Pilot

WmlTextBoxAdapter
WmlTextViewAdapter
WmlValidationSummaryAdapter
WmlValidatorAdapter
Chapter 42. The System.Web.UI.WebControls Namespace
AdCreatedEventArgs
AdCreatedEventHandler
AdRotator
BaseCompareValidator
BaseDataList
BaseValidator
BorderStyle
BoundColumn

Button
ButtonColumn
ButtonColumnType
Calendar
CalendarDay
CalendarSelectionMode
CheckBox
CheckBoxList
CommandEventArgs
CommandEventHandler
CompareValidator
CustomValidator
DataGrid
DataGridColumn
DataGridColumnCollection
DataGridCommandEventArgs
DataGridCommandEventHandler
DataGridItem
DataGridItemCollection
DataGridItemEventArgs
DataGridItemEventHandler
DataGridPageChangedEventArgs
DataGridPageChangedEventHandler
DataGridPagerStyle
DataGridSortCommandEventArgs
DataGridSortCommandEventHandler
DataKeyCollection
DataList
DataListCommandEventArgs
DataListCommandEventHandler

DataListItem
DataListItemCollection
DataListItemEventArgs
DataListItemEventHandler
DayNameFormat
DayRenderEventArgs
DayRenderEventHandler
DropDownList
EditCommandColumn
FirstDayOfWeek


This document is created with a trial version of CHM2PDF Pilot

FontInfo
FontNamesConverter
FontSize
FontUnit
FontUnitConverter
GridLines
HorizontalAlign
HyperLink
HyperLinkColumn
HyperLinkControlBuilder
Image
ImageAlign
ImageButton
IRepeatInfoUser
Label
LabelControlBuilder

LinkButton
LinkButtonControlBuilder
ListBox
ListControl
ListItem
ListItemCollection
ListItemControlBuilder
ListItemType
ListSelectionMode
Literal
LiteralControlBuilder
MonthChangedEventArgs
MonthChangedEventHandler
NextPrevFormat
PagedDataSource
PagerMode
PagerPosition
Panel
PlaceHolder
PlaceHolderControlBuilder
RadioButton
RadioButtonList
RangeValidator
RegularExpressionValidator
RepeatDirection
Repeater
RepeaterCommandEventArgs
RepeaterCommandEventHandler
RepeaterItem
RepeaterItemCollection

RepeaterItemEventArgs
RepeaterItemEventHandler
RepeatInfo
RepeatLayout
RequiredFieldValidator
SelectedDatesCollection
ServerValidateEventArgs


This document is created with a trial version of CHM2PDF Pilot

ServerValidateEventArgs
ServerValidateEventHandler
Style
Table
TableCell
TableCellCollection
TableCellControlBuilder
TableHeaderCell
TableItemStyle
TableRow
TableRowCollection
TableStyle
TargetConverter
TemplateColumn
TextAlign
TextBox
TextBoxControlBuilder
TextBoxMode
TitleFormat

Unit
UnitConverter
UnitType
ValidatedControlConverter
ValidationCompareOperator
ValidationDataType
ValidationSummary
ValidationSummaryDisplayMode
ValidatorDisplay
VerticalAlign
WebColorConverter
WebControl
Xml
Appendix A. Type, Method, Property, and Field Index
A-F
G-N
O-Y
Colophon
Index

[ Team LiB ]


This document is created with a trial version of CHM2PDF Pilot


[ Team LiB ]

Copyright
Copyright © 2003, 2002 O'Reilly & Associates, Inc.

Printed in the United States of America.
Published by O'Reilly & Associates, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O'Reilly & Associates books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (). For more information, contact our corporate/institutional sales
department: (800) 998-9938 or
Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly &
Associates, Inc. Openwave and the Openwave logo are trademarks of Openwave Systems, Inc. All rights reserved.
JScript, Microsoft, Visual Basic, Visual C++, Visual Studio, Windows, and Windows NT are registered trademarks, and
Visual C# is a trademark of Microsoft Corporation. Many of the designations used by manufacturers and sellers to
distinguish their products are claimed as trademarks. Where those designations appear in this book, and O'Reilly &
Associates, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. The
association between the image of a stingray and the topic of ASP.NET is a trademark of O'Reilly & Associates, Inc.
While every precaution has been taken in the preparation of this book, the publisher and authors assume no
responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

[ Team LiB ]


This document is created with a trial version of CHM2PDF Pilot


[ Team LiB ]

Preface
ASP.NET is the web development technology of Microsoft's .NET development platform. While it has a lot in common
with its predecessor, Active Server Pages, ASP.NET is a quantum leap over classic ASP; it adds such new features as
rich server controls, a much more powerful programming model, and built-in support for XML web services.
ASP.NET also allows you to access the full richness of the .NET Framework Class Library, which provides classes for
everything from sending mail via SMTP to performing multithreaded operations. ASP.NET also brings object-oriented
programming to the Web. Object orientation is at the very heart of the .NET Framework, and ASP.NET takes full

advantage of it—particularly in the area of its robust server control model.
This second edition of ASP.NET in a Nutshell also includes information about new features and settings introduced in
Version 1.1 of the .NET Framework.
ASP.NET has many new features and aspects, but with the help of this reference, you'll be up and running before you
know it.

[ Team LiB ]


This document is created with a trial version of CHM2PDF Pilot


[ Team LiB ]

Who Is This Book for?
This book is intended primarily as a reference and learning tool for developers who have experience in web
development. Both professional and amateur developers will find this book helpful in making the transition from classic
ASP (or other web development technologies) to ASP.NET.
This book is not intended for beginners or those with no experience with web development. While the tutorial section
that begins the book is intended to bring you up to speed on ASP.NET quickly, it does not teach basic web development
skills. Beginners or those with no experience with classic ASP would do well to find a good introductory web
development book and then return to this book once they understand the fundamentals of web development.

[ Team LiB ]


This document is created with a trial version of CHM2PDF Pilot


[ Team LiB ]


How to Use This Book
This book consists of an introductory tutorial section, two reference sections, and an appendix. If you're new to
ASP.NET, you may want to read through the entire tutorial section from start to finish. This will give you a good
exposure to all of the features of ASP.NET as well as experience writing ASP.NET code.
Once you've become comfortable with the concepts introduced in the tutorial section, the remaining reference sections
will help you work through everyday ASP.NET development tasks.

[ Team LiB ]


This document is created with a trial version of CHM2PDF Pilot


[ Team LiB ]

How This Book Is Structured
ASP.NET in a Nutshell, Second Edition, consists of four parts. Part I, provides an introductory tutorial to ASP.NET
consisting of the following 11 chapters:
Chapter 1
Provides an overview of the .NET Framework and the features of ASP.NET.
Chapter 2
Describes the types of applications that can be written with ASP.NET and discusses the file types used by
ASP.NET and the structure of an ASP.NET application.
Chapter 3
Describes the structure of ASP.NET Web Forms, including page directives, coding styles, event handling, and
page output caching.
Chapter 4
Describes the web services architecture provided by ASP.NET and shows how to create and consume web
services in ASP.NET. It also shows how to publish and locate web services.

Chapter 5
Describes the HTML controls and web controls built into ASP.NET and shows how to use them in your ASP.NET
pages.
Chapter 6
Describes two of the reuse techniques available in ASP.NET—user controls and custom server controls—and
shows when and how to take advantage of each to enable code reuse in your applications.
Chapter 7
Describes ADO.NET, the new technology for data access in the .NET Framework, and shows you how to use
ADO.NET and the new data binding framework of ASP.NET to quickly build robust data-driven pages.
Chapter 8
Describes the new configuration system in ASP.NET and shows you how to configure your application for several
common scenarios.
Chapter 9
Describes the new authentication and authorization features in ASP.NET and shows you how to take advantage
of them in your applications.
Chapter 10
Describes the new structured exception handling features of the Visual Basic .NET language and the tracing
feature of ASP.NET. It also shows you how to use these new features, along with the .NET Framework SDK
Debugger and/ or Visual Studio .NET, to troubleshoot and debug your applications.
Chapter 11
Describes the options available for deploying ASP.NET applications and shows you how to take advantage of
them.
Like classic ASP, ASP.NET exposes a number of intrinsic objects to every page. These objects provide information on
requests, allow sending of or manipulation of responses, and provide useful utility functions. Part II, documents each of
the classes that provide the functionality for the Application, Context, Request, Response, Server, and Session
intrinsics, as well as for the HttpException class and the Page class, which forms the basis for each ASP.NET page. Part
II also includes a reference of the most common elements of the web.config configuration file.
The first reference section provides detailed information on the classes that replace classic ASP intrinsic objects, on the
Page class, and on the elements found in the web.config file. Each chapter is divided into the following sections to help
you locate the information you're looking for quickly:

Introduction
This section introduces the class and describes its purpose and common uses.
Summary
This section lists the most commonly used properties, methods, collections, and events of the class. Members
that are inherited from a base class or not typically used may be omitted.


This document is created with a trial version of CHM2PDF Pilot

that are inherited from a base class or not typically used may be omitted.
Comments/Troubleshooting
This section provides information about gotchas to watch out for when using the class, as well as other
important things to be aware of.
Properties
This section describes the properties for the class and provides examples of their use.
Collections
This section describes the collections for the class and provides examples of their use.
Methods
This section describes the methods for the class and provides examples of their use.
Events
This section describes the events for the class, and provides examples of their use. Note that not all classes
expose events, so not every chapter will have an "Events" section.
Because ASP.NET is considerably broader in the scope of its APIs than classic ASP, Part III, provides a high-level
reference of the namespaces that are most relevant to ASP.NET development. These namespaces include:
System.Web
System.Web.Caching
System.Web.Configuration
System.Web.Hosting
System.Web.Mail
System.Web.Mobile

System.Web.Security
System.Web.Services
System.Web.Services.Configuration
System.Web.Services.Description
System.Web.Services.Discovery
System.Web.Services.Protocols
System.Web.SessionState
System.Web.UI
System.Web.UI.Design
System.Web.UI.Design.WebControls
System.Web.UI.HtmlControls
System.Web.Mobile.UI.MobileControls
System.Web.Mobile.UI.MobileControls.Adapters
System.Web.UI.WebControls
The chapter covering each namespace describes each of the types contained in the namespace, and lists all members of
each type.
Finally, the book includes one appendix, Appendix A: Type, Method, Property, and Field Index, which contains an
alphabetical listing of the types and members found in Part III. You can use it to determine the namespace to which a
particular type or member in which you're interested belongs.

[ Team LiB ]


This document is created with a trial version of CHM2PDF Pilot


[ Team LiB ]

Conventions Used in This Book
The following font conventions are used in this book:

Italic
Used for pathnames, filenames, program names, Internet addresses such as domain names and URLs, and new
terms where they are defined.
Constant Width
Used for command lines and options that should be typed verbatim, and names and keywords in program
examples. Also used for parameters, attributes, configuration file elements, expressions, statements, and
values.

Constant-Width Italic
Used for replaceable terms, such as variables or optional elements, within syntax lines.

[ Team LiB ]


×