Course Title: ASP.NET Using Visual C# 2005
Course #: ASP04I
Duration: 5 days
Overview:In this course, you’ll learn how to use Visual Studio 2005 and Visual C# 2005 to build ASP.NET 2.0 Web pages and XML Web services. You’ll gain an understanding of the new architecture behind ASP.NET 2.0 and how to use the new server controls. You’ll learn to create consistent web sites using Master Pages, to improve performance with output caching, add membership features, configure and deploy ASP.NET applications, to authenticate users and limit their access to resources, direct users using new Site Navigation tools and to handle multi-user data access conflicts.
Topics:Introduction to ASP.NET
- A Review of Classic ASP
- Dynamically Creating Web Pages
- ASP Shortcomings
- ASP.NET to the Rescue
- ASP.NET Web Applications
- Creating a New Web Application
- Rendering HTML with Server Controls
- Types of Server controls
- Using HTML Controls
- Using Web Controls
- Data Binding in ASP.NET 2.0
What's New in ASP.NET 2.0
- New Features in ASP.NET 2.0
- The ObjectDataSource Control
- The GridView control
- Creating and Consuming Web Services
- Encrypting Configuration Sections
- Membership
- Web Parts and Personalization
- Designer Features
- Master Pages
- Themes and Skins
- Controlling Automatic Formatting
- IntelliSense in Source View
- Deployment and Configuration Tools
- The Web Site Administration Tool
- Copy and Publish Web Sites
- Increasing Productivity
- Developer Productivity
- Team Productivity
Working with Controls
- Introduction to Web Controls
- The WebControl Class
- The Label Control
- Simple Input Controls
- TextBox Controls
- CheckBox Controls
- RadioButton Controls
- HyperLink and Button Controls
- Postback Behavior
- HyperLink Controls
- Button Controls
- Displaying Images
- Using the ImageMap Control
- List Controls
- The Sample Page
- Adding Items to Lists
- Adding Items Programmatically
- Handling Selections and Postbacks
- Clearing Selected Items
- Removing Items
- Controlling Focus
- Setting Form Defaults
- Calling the Focus() Method
- Using TabIndex and AccessKey
- Overriding Default Button Settings with Panel Controls
Using Rich Server Controls
- Introduction to Rich Controls
- The Calendar Control
- Working with the Calendar Control
- Handling Calendar Events
- Adding Custom Content with DayRender
- Investigating the Client-Side Code
- The AdRotator Control
- How the AdRotator Works
- Setting Up the Advertisement File
- Adding User-Defined Elements
- Setting the Target Frame
- Filtering Images with the KeywordFilter Property
- Using the AdCreated Event
- The XML Control
- Setting the XML Control Properties
Accessing Data
- Overview of ADO.NET
- ADO.NET Classes
- The ADO.NET Architecture
- Creating ADO.NET Data Objects
- The DataTable Object
- Connecting to Data
- Setting up Connection Information
- Using the connection Object
- Executing Commands
- Using a SqlDataReader
- Working with Data
- Working with Data Using a Data Adapter
- Managing Data with the DataSet Object
- Filling a DataTable within a DataSet
- Filling DataSets from SQL Server
- Choosing an ADO.NET Provider
- The SQL Server .NET Data Provider
- The OLE DB .NET Data Provider
- The ODBC Data Provider
- Writing Code for Multiple Providers
Configuration
- Configuration Overview
- Navigating the Configuration File Hierarchy
- Configuration File Elements
- ASP.NET Configuration Tools
- Configuration Security Features
- Using the Web Site Administration Tool
- The Web Site Administration Tool Graphical User Interface
- Using the Web Site Administration Tool to Create a Custom Error Page
- Programming Configuration Files
- The Configuration APIs
- Storing and Retrieving Connection Strings
- Writing to Configuration Files
- Using External Configuration Files
- Encrypting Configuration Sections
- Protected Configuration Providers
- Encrypting the connectionStrings Section in Web.config
- Encrypting External Configuration Files
Data Binding
# Introducing Data Source Controls
- Reading and Write Data Using the SqlDataSource Control
- Displaying and Editing Middle-Tier Data using the ObjectDataSource Control
- Displaying XML Data Using the XmlDataSource Control
Validating User Input
- Overview of ASP.NET Validation Controls
- The Validation Controls
- Using the Simple Validators
- Using the RequiredFieldValidator
- Using a RangeValidator to Ensure that Data Falls within a Specified Range
- Using a CompareValidator to Compare Values
- Using the Complex Validators
- Validate General Text with the RegularExpressionValidator
- Create Your Own Validation Using the CustomValidator Control
- Summarizing Results with the ValidationSummary Control
- Display Modes for the ValidationSummary Control
- Separating Validation into Validation Groups
Themes and Master Pages
- Creating a Consistent Web Site
- Reviewing Cascading Style Sheets
- ASP.NET 2.0 Themes
- Working with Themes, Folders, and Skins
- Applying a Theme
- Creating a Theme
- Working with Themes
- Creating Named Skins
- More Issues with Themes
- Master Pages
- Creating a Master Page
- Creating a Content Page
- Converting a Standard Page to a Content Page
- Adding Default Content
- Practical Master Pages
Site Navigation
- Providers and Data Sources
- The Default XmlSiteMapProvider
- The SiteMapDataSource Control
- Creating an XML Site Map File
- A Hierarchy of Nested siteMapNode Elements
- Built-in and Custom Attributes
- Site Navigation Controls
- Breadcrumbs and Hierarchical Navigation
- Using the Site Navigation API
- Accessing Current and Sibling Nodes
- URL Mapping
- Mapping URLs in Web.config
- Adjusting the Site Map
- Using Multiple Site Map “Providers”
- Security Trimming
- Authentication and Authorization
- Enabling Security Trimming
- Automatic Role-Based Trimming
Displaying Data with the GridView Control
- Introducing the GridView Control
- Displaying Data with the GridView Control
- Edit the Columns
- Filter Data in the GridView Control
- Create the DropDownList of Countries
- Filter the Data Based on the Selected Country
- Allow Users to Select from a DropDownList in the Grid
- Introducing Templates
- Convert the Country Filed into a Template
- Add a Hyperlink to the Grid
- Create the CustomerOrders Page
- Create the Hyperlink
- Deleting a Row and Handling Errors
- Add the Delete Link
- Add the Client-Side Alert
- Add Event-Handling Code
- What’s Left?
Managing State
- Preserving State in Web Applications
- Methods of Preserving State
- Page-Level State
- Enabling Dynamic Page Modifications
- View State and Page Lifecycle
- Enabling Change Events
- Understanding View State
- When to Disable View State
- The Limitations of Page-Level State
- Using Cookies to Preserve State
- Working with Cookies in ASP.NET Code
- The Limitations of Using Cookies
- ASP.NET Session State
- Problems in Classic ASP
- Storing Objects in Session State
- Storing ADO.NET Objects in Session
- Session State Object Storage
- Configuring Session State
- Editing Configuration Files
- Session State Options
- Setting Up an Out-of-Process State Server
- Ensuring that Your Data is Serializable
- Testing StateServer Session State
- Storing Session State in SQL Server
- Configuring SQL Server Session State
- Testing SQL Server Session State
- Using Cookieless Session IDs
- Application State
Managing Users with ASP.NET's Membership Features
- Introduction to Membership and Roles
- Introducing Membership Management in ASP.NET 2.0
- Introducing Role Management in ASP.NET 2.0
- The Security Services Stack
- Data Has to Go Somewhere
- Configuring Members and Roles
- Modifying Provider Behavior
- Working with Roles
- Authentication and Cookies
- Using Membership Controls
- LoginStatus Control
- Login Control
- LoginView Control
- LoginName Control
- ChangePassword Control
- PasswordRecovery Control
- CreateUserWizard Control
- Writing Code to Interact with Membership and Roles
- The Membership and MembershipUsers Classes
- The Roles Class
- Creating Custom Providers
- Setting up the XML Provider
Debugging
- Using the Visual Debugger
- New Debugging Features
- Configuring Debugging
- Setting Breakpoints
- Stepping Through Code
- Debugging Exceptions and Handling Errors
- The Exception Assistant
- Redirecting Users
- Debugging Client-Side Script
- Configuring Script Debugging
- Debugging Script in Resource Files
- Debugging Stored Procedures
- Creating a Database Project
- Working with Data Connections
- Debugging Stored Procedures
Tracing
- ASP.NET Trace
- Page-Level Tracing
- Application-Level Tracing
- Instrumenting with Trace Listeners
- The WebPageTraceListener
- Health Monitoring with Web Events
- Working with the TraceFinished Event
- Sending Web Event Data to SQL Server
- Using SqlWebEventProvider
- Providers, Rules, and Event Mappings
- Viewing Event Data
Creating New Controls
- Two Kinds of User-Defined Controls
- Creating a User Control
- A More Complex User Control
- Investigating the User Control
- Providing States Data
- User Control Properties
- User Control Events
- Testing the User Control
- Why Not Stop Here?
- Creating a Custom Control
- Investigating the StateDropDownList Control
- Rendering the Control
- Control Properties
- Managing Property Behavior Using Attributes
- Working with Postback Data
- Specifying a Toolbox Icon
- Finishing Touches
- What’s Next?
Improving Performance with Output Caching
- The Importance of Caching
- Improvements over Classic ASP
- Types of Caching in ASP.NET
- Declarative Page Output Caching
- Caching Static Pages
- Code Behind the Caching Example Pages
- Caching Multiple Versions of a Page
- Caching Page Fragments
- Using VaryByControl
- Caching Multiple Version of a Control on a Page
- Post-Cache Substitution
- Calling a Method to Insert HTML
- Using a Substitution Control
- Caching Configuration
- Output Cache Profiles
- Global Configuration Settings
Advanced Caching Techniques
- ASP.NET Caching Review
- Declarative Output Caching
- New Caching Features in 2.0
- Testing Caching in Visual Studio 2005
- Programmatic Page Caching
- The Caching Object Model
- Caching Static Pages Programmatically
- Caching Data
- Using Cache.Add and Cache.Insert
- Controlling Expiration
- Caching Data with Dependencies
- Expiring a Cached Item when Data Changes
- Polling for Changes to a Table
- Polling for Changes to Query Results
- Using SQL Server 2005 Query Notifications for Caching
Using the DataList and Repeater Controls
- Overview of List-Bound Controls
- Creating a Repeater Control
- Binding the Repeater Control to Data
- The CategoryDetail Page
- Creating a DataList Control
- Formatting the DataList
- Binding Data to the DataList
- Displaying Bound Data
- Selecting a Row
- Refreshing the Display
- Editing Data with the DataList
Creating and Consuming Web Services
- The Motivation for XML Web Services
- Web Service Requirements and Technologies
- Creating an XML Web Service with Visual Studio
- Adding Web Methods
- Testing the Web Service
- Designing XML Web Services
- Providing Services
- Marshalling Data
- Creating Web Service Consumers
- Understanding the Additions to the Project
- Calling a Web Service
- Discovering Web Services Using UDDI
- What is UDDI?
Audience: Programmers who will be developing in ASP.NET.
Prerequisites: Familiarity with Microsoft Windows 2000 or higher, the Internet and building basic Web sites. Some prior experience with Visual Studio will be helpful.