ASP.NET Unleashed
Table of Contents
Introduction
Part I - Working with ASP.NET Web Forms
- Chapter 1 - Building ASP.NET Pages
- ASP.NET and the .NET Framework
- The .NET Framework Class Library
- Understanding Namespaces
- Standard ASP.NET Namespaces
- .NET Framework-Compatible Languages
- Introducing ASP.NET Controls
- A Simple ASP.NET Page
- Benefits of ASP.NET Controls
- Overview of ASP.NET Controls
- Adding Application Logic to an ASP.NET Page
- Handling Control Events
- Handling Page Events
- The Structure of an ASP.NET Page
- Directives
- Code Declaration Blocks
- ASP.NET Controls
- Code Render Blocks
- Server-side Comments
- Server-side Include Directives
- Literal Text and HTML Tags
- Summary
- Chapter 2 - Building Forms with Web Server Controls
- Building Smart Forms
- Using Label Controls
- Using the TextBox Control
- Using Button Controls
- Using the RadioButton and RadioButtonList Controls
- Using the CheckBox and CheckBoxList Controls
- Using the DropDownList Control
- Using the ListBox Control
- Controlling Page Navigation
- Submitting a Form to a Different Page
- Using the Redirect() Method
- Working with the HyperLink Control
- Applying Formatting to Controls
- Base Web Control Properties
- Applying Styles to Web Controls
- Summary
- Chapter 3 - Performing Form Validation with Validation Controls
- Using Client-side Validation
- Configuring Client-side Validation
- Enabling and Disabling Client-side Validation
- Requiring Fields: The RequiredFieldValidator Control
- Comparing to an Initial Value
- Validating Expressions: The RegularExpressionValidator _Control
- Validating E-Mail Addresses
- Validating Usernames and Passwords
- Validating Phone Numbers
- Validating Web Addresses
- Checking for Entry Length
- Validating ZIP Codes
- Comparing Values: The CompareValidator Control
- Comparing the Value of One Control to the Value _of Another
- Comparing the Value of a Control to a Fixed Value
- Performing a Data Type Check
- Checking for a Range of Values: The RangeValidator _Control
- Summarizing Errors: The ValidationSummary Control
- Displaying Pop-Up Error Messages
- Performing Custom Validation: The CustomValidator _Control
- Validating Credit Card Numbers
- Disabling Validation
- Summary
- Chapter 4 - Advanced Control Programming
- Working with View State
- Disabling View State
- Adding Values to View State
- Displaying and Hiding Content
- Using the Visible and Enabled Properties
- Using the Panel Control
- Simulating Multipage Forms
- Adding Controls Programmatically
- Adding Controls to a Page
- The PlaceHolder Control
- Dynamically Generating Forms
- Dynamically Generating List Items
- Using Rich Controls
- Displaying Interactive Calendars with the Calendar _Control
- Rendering Calendar Days
- Displaying Banner Advertisements with the AdRotator _Control
- Accepting File Uploads with the HTMLInputFile Control
- Summary
Part II - Advanced ASP.NET Page Development
- Chapter 5 - Creating Custom Controls with User Controls
- Including Standard Content with User Controls
- Exposing Properties and Methods in User Controls
- Exposing Web Controls in User Controls
- Exposing Events in User Controls
- Loading User Controls Programmatically
- Summary
- Chapter 6 - Separating Code from Presentation
- Creating Business Components
- Creating a Simple Business Component
- Creating Multitiered Web Applications
- Using Code-Behind
- How Code-Behind Really Works
- Compiling Code-Behind Files
- Inheriting Multiple Pages from a Code-Behind File
- Compiling a Complete ASP.NET Page
- Summary
- Chapter 7 - Targeting Mobile Devices with Mobile Controls
- Using Mobile Device Software Simulators
- Introduction to the Wireless Application Protocol
- Building WML Pages
- Configuring Internet Information Server
- WML and XML
- Creating a Deck of Cards
- Linking Files with WML
- Using ASP.NET Mobile Controls
- Creating Mobile Forms
- Dynamically Activating a Mobile Form
- Displaying Text
- Displaying Lists
- Creating Text Boxes
- Validating User Input
- Displaying Images
- Placing Phone Calls
- Displaying Advertisements with Mobile Controls
- Displaying Calendars with Mobile Controls
- Creating Cross-Device-Compatible Mobile Pages
- Detecting Mobile Capabilities
- Choosing Devices with DeviceSpecific
- Using Form Template Sets
- Summary
- Chapter 8 - Using Third-Party Controls
- Using the Microsoft Internet Explorer WebControls
- Using the TreeView Control
- Using the Toolbar Control
- Using the TabStrip Control
- Using the Superexpert Controls
- Using the Content Rotator Control
- Using the SuperDataGrid Control
- Using the DataForm Control
- Summary
Part III - Working with ADO.NET
- Chapter 9 - Introduction to ADO.NET
- An Overview of ADO.NET
- Performing Common Database Tasks
- Opening a Database Connection
- Retrieving Records from a Database Table
- Using Parameters with Queries
- Adding Records to a Database
- Updating Database Records
- Deleting Database Records
- Improving Database Performance
- Using SQL Stored Procedures
- Retrieving Return Values and Output Parameters
- Executing Complex Stored Procedures
- Improving Performance with Connection Pooling
- Advanced Database Topics
- Executing Database Commands in a Transaction
- Specifying a Command Behavior
- Retrieving Table Schema Information
- Summary
- Chapter 10 - Binding Data to Web Controls
- Overview of Data Binding
- Binding a Server Control to a Data Source
- Binding to the Repeater Control
- Using Templates
- View State and the Repeater Control
- Binding to the DropDownList Control
- Binding to the RadioButtonList Control
- Binding to the CheckBoxList Control
- Binding to a ListBox Control
- Binding to Other Controls
- Creating Master/Detail Forms
- Creating Single-Page Master/Detail Forms
- Creating Multipage Master/Detail Forms
- Summary
- Chapter 11 - Using the DataList and DataGrid Controls
- Overview of the DataList and DataGrid Controls
- Understanding Event Bubbling
- Using Templates
- Using the DataKeys Collection
- Using the DataList Control
- Displaying Data in a DataList
- Using Templates with a DataList
- Using Styles with a DataList
- Creating Multiple Columns in a DataList
- Capturing Events Raised in a DataList Control
- Selecting Items in a DataList Control
- Using the DataKeys Collection with the DataList
Control
- Creating a Master/Detail Form with a DataList Control
- Editing Items in a DataList Control
- Using the DataGrid Control
- Creating Columns in a DataGrid Control
- Using Styles with a DataGrid
- Sorting Columns in a DataGrid Control
- Paging Through Records in a DataGrid
- Selecting Rows in a DataGrid Control
- Editing Items in a DataGrid Control
- Editing Items in a DataGrid Control with Templates
- Summary
- Chapter 12 - Working with DataSets
- Understanding DataSets
- Elements of DataSets
- Adding DataTables to a DataSet
- Binding Controls to a DataSet
- Understanding DataTables
- Creating DataTables Programmatically
- Setting DataTable Properties
- Setting Column Properties in a DataTable
- Computing Column Values in a DataTable
- Defining Relationships Between DataTables
- Retrieving DataTable Schema Information
- Updating Records in a DataTable
- Understanding DataViews
- Filtering Rows in a DataView
- Sorting Rows in a DataView
- Finding Rows in a DataView
- Using DataSets with ASP.NET Pages
- Caching DataSets
- Displaying Cached Data
- Filtering Cached Data
- Finding a Row in a Cached DataSet
- Summary
- Chapter 13 - Working with XML
- Overview of the XML Classes
- Using XML with DataSets
- Reading an XML Document into a DataSet
- Using a Schema with ReadXml
- Writing an XML Document from a DataSet
- Using XMLDataDocuments with DataSets
- Transforming XML with XSL Stylesheets
- Using the ASP.NET Xml Control
- Using the XslTransform Class
- Using Strongly Typed DataSets
- Summary
- Chapter 14 - Using ADO.NET to Create a Search Page
- Using SQL Server Full-Text Search
- Configuring the Full-Text Search Service
- Performing Free Text Queries with Database Data
- Performing Boolean Queries with Database Data
- Using the CONTAINSTABLE Function
- Uploading and Indexing Binary Documents
- Using the Microsoft Indexing Service
- Configuring the Microsoft Indexing Service
- Configuring SQL Server to Use Microsoft Indexing _Service
- Retrieving Document Properties
- Performing Free Text Queries with File System Data
- Performing Boolean Queries with File System Data
- Performing Queries with Document Properties
- Summary
Part IV - Working with ASP.NET Applications
- Chapter 15 - Creating ASP.NET Applications
- Overview of ASP.NET Applications
- Using Application State
- Understanding Application State and Synchronization
- Using the Global.asax File
- Understanding Context and Using the Global.asax
File
- Handling the Application Start and Init Events
- Handling the Application_BeginRequest Event
- Using the Web.Config File
- Examining the Configuration Sections
- Modifying Configuration Settings
- Setting the Configuration Location
- Locking Configuration Settings
- Adding Custom Configuration Information
- Using HTTP Handlers and Modules
- Working with HTTP Handlers
- Working with HTTP Modules
- Creating the WhosOn Application
- Summary
- Chapter 16 - Tracking User Sessions
- Using Browser Cookies
- How Cookies Work
- Creating and Reading Session Cookies
- Creating and Reading Persistent Cookies
- Setting Cookie Properties
- Examining Limitations of Cookies
- Using Session State
- Adding Items to Session State
- Removing Items from Session State
- Starting a User Session
- Ending a User Session
- Handling Session Events
- Storing Session State in Process
- Storing Session State in a Windows Service
- Storing Session State in a Database Table
- Disabling Session State
- Using Cookieless Sessions
- Enabling Cookieless Sessions
- Examining Limitations of Cookieless Sessions
- Summary
- Chapter 17 - Caching ASP.NET Applications
- Using Page Output Caching
- Varying Cache Contents by Parameter
- Varying Cache Contents by Header
- Varying the Cache Contents by a Custom String
- Setting the Cache Location
- Working with the HttpCachePolicy Class
- Using Page Fragment Caching
- Varying Page Fragment Caching by Parameter
- Examining the Limitations of Page Fragment Caching
- Using Page Data Caching
- Adding Items to the Cache
- Adding Cache File Dependencies
- Adding Cache Trigger Dependencies
- Adding Cache Key Dependencies
- Creating an Absolute Expiration Policy
- Creating a Sliding Expiration Policy
- Setting Cache Item Priorities
- Creating a Cache Callback Method
- Summary
- Chapter 18 - Application Tracing and Error Handling
- Responding to Errors
- Viewing Error Information
- Page-Level Error Handling
- Application-Level Error Handling
- Tracing and Monitoring Your Application
- Tracing Page Execution
- Monitoring the ASP.NET Process
- Retrieving Process Information
- Logging Events
- Using Performance Counters
- Using the Debugger
- Attaching the Debugger
- Creating Breakpoints
- Creating Watches
- Stepping Through an ASP.NET Page
- Summary
Part V - Securing ASP.NET Applications
- Chapter 19 - Using Forms-Based Authentication
- Working with Forms Authentication
- Enabling Forms Authentication
- Configuring Forms Authentication
- Configuring Forms Authorization
- Retrieving User Information
- Creating a Sign Out Page
- Authenticating Users with the Web.Config File
- Authenticating Users with an XML File
- Authenticating Users with a Database Table
- Implementing Roles-based Authentication
- Creating a Custom Authentication Ticket
- Using Forms Authentication and Web Farms
- Working with Passport Authentication
- Enabling Passport Authentication
- Enabling Users to Sign In and Sign Out
- Retrieving User Information
- Summary
- Chapter 20 - Using Windows-Based Authentication
- Working with Windows Authentication
- Configuring Internet Information Server Security
- Configuring Microsoft Windows Security
- Configuring Windows Authentication
- Configuring Windows Authorization
- Configuring Custom Roles
- Retrieving User Information
- Impersonating User Accounts
- Executing ASP.NET Pages under a User Account
- Setting Security Policies
- Summary
- Chapter 21 - Encrypting Data over the Network
- Using the Secure Sockets Layer
- Encryption
- Authentication
- Data Integrity
- How Secure Is SSL?
- Configuring Your Server to Use SSL
- Generating a Certificate Request File
- Applying for a Server Certificate
- Installing Your Server Certificate
- Using SSL in ASP.NET Pages
- Using .NET Encryption Classes
- Using Hash Algorithms
- Using Symmetric Encryption Algorithms
- Using Asymmetric Encryption
- Summary
Part VI - Building ASP.NET Web Services
- Chapter 22 - Creating an XML Web Service
- Overview of XML Web services
- XML Web Services Facilitate Communication
- XML Web Services Enable Aggregation
- Creating a Simple XML Web Service
- Setting WebMethod Attributes
- Setting WebService Attributes
- Precompiling an XML Web Service
- Testing an XML Web Service from a Browser
- Invoking an XML Web Service with HTTP-Get
- Invoking an XML Web Service with HTTP-Post
- Invoking an XML Web Service with SOAP
- Accessing an XML Web service Through a Proxy Class
- Generating an XML Web Service Proxy Class
- Using an XML Web Service Proxy Class
- Working with the Web Services Discovery Tool
- Setting Proxy Class Properties
- Transmitting Complex Data in an XML Web service
- XML Web Services and Arrays
- XML Web Services and Classes
- Web Services and DataSets
- Web Services and Binary Files
- Examining XML Web Service and Web Site Interaction
- XML Web Services and Application State
- XML Web Services and Session State
- Summary
- Chapter 23 - Advanced XML Web Services
- Using the WebService Behavior
- Examining Limitations of the WebService Behavior
- Creating a Simple Page with a WebService Behavior
- Using a WebService Behavior Callback Function
- Catching Errors in a WebService Behavior
- Using a WebService Behavior to Perform _Partial Page Updates
- Using the WebService Behavior to Retrieve _Database Data
- Securing an XML Web Service
- Overview of the Secure XML Web Service
- Creating the Database Tables
- Creating the Login() Method
- Retrieving the Custom SOAP Header
- Authenticating the Session Key
- Caching the Session Keys
- Building the Secure XML Web Service
- Accessing the Secure Web Service
- Using HTML Pattern Matching
- Creating the WSDL Document
- Specifying the Regular Expression Pattern
- Creating a Simple HTML Pattern Matching Service
- Using Input Parameters with HTML Pattern Matching
- Building the Six Degrees Web Service
- Summary
Part VII - Leveraging the .NET Framework
- Chapter 24 - Working with Collections and Strings
- Working with Collections
- Using the ArrayList Collection
- Using the HashTable Collection
- Working with Strings
- Formatting Strings
- Using String Methods and Properties
- Using the StringBuilder Class
- Appending Strings to a StringBuilder
- Working with Regular Expressions
- Using Regular Expression Classes
- Examining Elements of a Regular Expression
- Matching Single Characters
- Matching Special Characters
- Matching Alternative Sequences of Characters
- Matching with Quantifiers
- Identifying Regular Expressions and Greed
- Capturing and Backreferences
- Using Replacement Patterns
- Setting Regular Expression Options
- Summary
- Chapter 25 - Working with the File System
- Using Files and Directories
- Creating and Reading Text Files
- Creating and Reading Binary Files
- Displaying the Contents of a Directory
- Retrieving Path Information
- Using Serialization
- Using Binary Serialization
- Using XML Serialization
- Summary
- Chapter 26 - Sending E-Mail and Accessing the Network
- Sending E-mail From an ASP.NET Page
- The Microsoft SMTP Service
- Sending a Simple E-mail Message
- Using the MailMessage Class
- Adding Attachments to an E-mail Message
- Sending HTML E-Mail
- Using Message Queuing
- Configuring Microsoft Message Queuing
- Working with Message Queues
- Sending Messages to a Queue
- Retrieving Messages from a Queue
- Displaying the Body of a Message
- Sending and Receiving Complex Messages
- Accessing Other Web Sites with the HTTP Protocol
- Using the WebClient Class
- Using the HttpWebRequest Class
- Resolving Domain Names
- Summary
- Chapter 27 - Creating Graphics On-the-Fly with GDI+
- Building Simple Images
- Drawing Objects with GDI+
- Creating a Bitmap
- Working with the Graphics Object
- Setting Graphics Quality
- Using Colors
- Using Brushes
- Using Pens
- Setting Pen Cap Styles
- Drawing a Rectangle
- Drawing a Line
- Drawing an Ellipse
- Drawing a Curve
- Drawing a String of Text
- Building Sample GDI+ Applications
- Creating an ASP.NET Paint Application
- Creating a Simple Chart Application
- Summary
Part VIII - Building Custom ASP.NET Controls
- Chapter 28 - Developing Custom Controls
- Creating a Simple Control
- Using HtmlTextWriter
- Adding Properties and Methods to Controls
- Using Property Accessor Functions
- Using Methods with Controls
- Parsing Inner Content
- Adding Child Controls to a Control
- Creating a Custom Control Builder
- Examining Custom Controls and Events
- Adding Custom Events to a Control
- Participating in Postbacks
- Creating Composite Controls
- Handling Events in a Composite Control
- Inheriting from Existing Controls
- Accessing the Current Context
- Debugging Controls
- Summary
- Chapter 29 - Advanced Control Development
- Adding Templates to a Control
- Creating Multiple Instances of a Template
- Adding Multiple Templates to a Control
- Creating DataBound Controls
- Implementing Different Data Sources
- Implementing a Simple DataBound Control
- Using DataBound Controls and Templates
- Using DataBound Controls and State
- Binding a Custom Control to a DataSet
- Using Custom Controls and Web Services
- Creating the Featured Products Web Service
- Creating the Featured Products Custom Control
- Displaying the Featured Products Control
- Summary
Part IX - Sample ASP.NET Applications
- Chapter 30 - Creating a Job Site
- Installing the Job Site
- Creating the Home Page
- Authenticating Users
- Creating Vanity URLs
- Listing and Updating Jobs
- Creating the Jobs XML Web Service
- Summary
- Chapter 31 - Creating an Online Store
- Overview of the ASP.NET Unleashed Sample Store
- Installing the ASP.NET Unleashed Sample Store
- Building the Navigation System
- Caching the Product Data
- Building the Shopping Cart
- Dynamically Loading Product Templates
- Using the LoadControl Method
- The Code-Behind Product Template
- Summary
Part X - Appendices
- Appendix A - Migrating from ASP to ASP.NET
- ASP.NET Pages End with the Extension .aspx
- Option Explicit Is On by Default
- No More Variants
- Use Parentheses When Passing Parameters to Subroutines _and Methods
- Functions and Subroutines Must Be Declared in <Script>
Tags
- Parameters Are Passed by Value
- Forms Should Post Back to the Same Page
- Only One Server-Side Form per Page
- Don't Use Set and Let When Working with Objects
- Apartment-Threaded Components Are Not Supported
- No Nonindexed Default Properties
- ASP.NET Pages Can Contain Only a Single Language
- Differences in Request, Request.Form, and _Request.QueryString
- Appendix B - HTML Control Reference
- Appendix C - Web Control Reference
Index
© Copyright Pearson Education. All rights reserved.
|