Book description
Professional ASP.NET 3.5 SP1 In C# and VB
ASP.NET 3.5 brings the power of Visual Studio® 2008 along with the multitude of language improvements in C# 2008 and Visual Basic® 2008 as well as powerful new technology called LINQ, together with the ASP.NET 2.0 Framework you already know and love. Packed with valuable coverage of ASP.NET 3.5 SP1, this essential resource offers both C# and VB examples throughout the book, and shares new and updated content on the ADO.NET Entity Framework, ADO.NET Dynamic Data, and ADO.NET Data Services.
While ASP.NET 3.5 boasts server controls like the ListView and the incredibly flexible GridView, it also includes advancements in AJAX technology combined with JavaScript® debugging features in Visual Studio 2008. With this book, a stellar author team covers the new controls in the AJAX toolbox, the back button history, and script combining, and they also examine the new capabilities of WCF including changes to DataContractSerializer. In addition, the accompanying CD-ROM features the entire book in PDF format.
What you will learn from this book
The concepts underlying the server control and its pivotal role in ASP.NET development
How to create templated ASP.NET pages using the master page feature
How to work with data from enterprise databases including SQL Server®
Ways to debug, package, and deploy ASP.NET applications, monitor their health and performance, and handle errors
How to retrieve, update, and delete data quickly and logically using LINQ with side-by-side examples comparing LINQ to existing techniques
Ways to localize your web site in multiple languages for a world-wide audience
Methods for adding AJAX capabilities to your ASP.NET applications
The many benefits of the new data access additions
Ways to use and extend the Provider Model for accessing data stores, processes, and more
What freeware tools you need in Scott Hanselman's ASP.NET Ultimate Developer Tools appendix
Who this book is for
This book is for programmers and developers who are looking to make the transition to ASP.NET 3.5 SP1 with Visual Studio 2008 and either C# 3.0 (2008) or Visual Basic 9 (2008).
CD-ROM includes the full book in PDF format and a selection of 7 Wrox Blox mini e-books including:
Internet Explorer 8 and Its Impact on Your ASP.NET Web Sites
Jumping from ASP.NET to Silverlight 2
Leverage LINQ in ASP.NET 3.5 Projects
Table of contents
- Copyright
- About the Authors
- Credits
- Acknowledgments
-
Introduction
- A Little Bit of History
- The Goals of ASP.NET
- Additional Features of ASP.NET 3.5 and 3.5 SP1
- What You Need for ASP.NET 3.5 SP1
- Who Should Read This Book?
- What This Book Covers
- Conventions
- Source Code
- Errata
- p2p.wrox.com
-
1. Application and Page Frameworks
- 1.1. Application Location Options
- 1.2. The ASP.NET Page Structure Options
- 1.3. ASP.NET 3.5 Page Directives
- 1.4. ASP.NET Page Events
- 1.5. Dealing with PostBacks
- 1.6. Cross-Page Posting
- 1.7. ASP.NET Application Folders
- 1.8. Compilation
- 1.9. Build Providers
- 1.10. Global.asax
- 1.11. Working with Classes Through VS2008
- 1.12. Summary
- 2. ASP.NET Server Controls and Client-Side Scripts
-
3. ASP.NET Web Server Controls
- 3.1. An Overview of Web Server Controls
- 3.2. The Label Server Control
- 3.3. The Literal Server Control
- 3.4. The TextBox Server Control
- 3.5. The Button Server Control
- 3.6. The LinkButton Server Control
- 3.7. The ImageButton Server Control
- 3.8. The HyperLink Server Control
- 3.9. The DropDownList Server Control
- 3.10. Visually Removing Items from a Collection
- 3.11. The ListBox Server Control
- 3.12. The CheckBox Server Control
- 3.13. The CheckBoxList Server Control
- 3.14. The RadioButton Server Control
- 3.15. The RadioButtonList Server Control
- 3.16. Image Server Control
- 3.17. Table Server Control
- 3.18. The Calendar Server Control
- 3.19. AdRotator Server Control
- 3.20. The Xml Server Control
- 3.21. Panel Server Control
- 3.22. The PlaceHolder Server Control
- 3.23. BulletedList Server Control
- 3.24. HiddenField Server Control
-
3.25. FileUpload Server Control
- 3.25.1. Uploading Files Using the FileUpload Control
- 3.25.2. Giving ASP.NET Proper Permissions to Upload Files
- 3.25.3. Understanding File Size Limitations
- 3.25.4. Uploading Multiple Files from the Same Page
- 3.25.5. Placing the Uploaded File into a Stream Object
- 3.25.6. Moving File Contents from a Stream Object to a Byte Array
- 3.26. MultiView and View Server Controls
-
3.27. Wizard Server Control
- 3.27.1. Customizing the Side Navigation
- 3.27.2. Examining the AllowReturn Attribute
- 3.27.3. Working with the StepType Attribute
- 3.27.4. Adding a Header to the Wizard Control
- 3.27.5. Working with the Wizard's Navigation System
- 3.27.6. Utilizing Wizard Control Events
- 3.27.7. Using the Wizard Control to Show Form Elements
- 3.28. ImageMap Server Control
- 3.29. Summary
-
4. Validation Server Controls
- 4.1. Understanding Validation
- 4.2. Client-Side versus Server-Side Validation
- 4.3. ASP.NET Validation Server Controls
- 4.4. Turning Off Client-Side Validation
- 4.5. Using Images and Sounds for Error Notifications
- 4.6. Working with Validation Groups
- 4.7. Summary
-
5. Working with Master Pages
- 5.1. Why Do You Need Master Pages?
- 5.2. The Basics of Master Pages
- 5.3. Coding a Master Page
- 5.4. Coding a Content Page
- 5.5. Specifying Default Content in the Master Page
- 5.6. Programmatically Assigning the Master Page
- 5.7. Nesting Master Pages
- 5.8. Container-Specific Master Pages
- 5.9. Event Ordering
- 5.10. Caching with Master Pages
- 5.11. ASP.NET AJAX and Master Pages
- 5.12. Summary
- 6. Themes and Skins
-
7. Data Binding in ASP.NET 3.5
- 7.1. Data Source Controls
- 7.2. Configuring Data Source Control Caching
- 7.3. Storing Connection Information
- 7.4. Using Bound List Controls with Data Source Controls
- 7.5. Other Databound Controls
- 7.6. Inline Data-Binding Syntax
- 7.7. Expressions and Expression Builders
- 7.8. Summary
-
8. Data Management with ADO.NET
-
8.1. Basic ADO.NET Features
- 8.1.1. Common ADO.NET Tasks
- 8.1.2. Basic ADO.NET Namespaces and Classes
- 8.1.3. Using the Connection Object
- 8.1.4. Using the Command Object
- 8.1.5. Using the DataReader Object
- 8.1.6. Using Data Adapter
- 8.1.7. Using Parameters
- 8.1.8. Understanding DataSet and DataTable
- 8.1.9. Using Oracle as Your Database with ASP.NET 3.5
- 8.2. The DataList Server Control
- 8.3. The ListView Server Control
- 8.4. Using Visual Studio for ADO.NET Tasks
- 8.5. Asynchronous Command Execution
- 8.6. Summary
-
8.1. Basic ADO.NET Features
- 9. Querying with LINQ
-
10. Working with XML and LINQ to XML
- 10.1. The Basics of XML
-
10.2. XmlReader and XmlWriter
- 10.2.1. Using XDocument Rather Than XmlReader
- 10.2.2. Using Schema with XmlTextReader
- 10.2.3. Validating Against a Schema Using an XDocument
- 10.2.4. Including NameTable Optimization
- 10.2.5. Retrieving .NET CLR Types from XML
- 10.2.6. ReadSubtree and XmlSerialization
- 10.2.7. Creating CLR Objects from XML with LINQ to XML
- 10.2.8. Creating XML with XmlWriter
- 10.2.9. Creating XML with LINQ for XML
- 10.2.10. Improvements for XmlReader and XmlWriter in 2.0
- 10.3. XmlDocument and XPathDocument
- 10.4. DataSets
- 10.5. The XmlDataSource Control
- 10.6. XSLT
- 10.7. Databases and XML
- 10.8. Summary
- 11. IIS7
-
12. Introduction to the Provider Model
- 12.1. Understanding the Provider
-
12.2. The Provider Model in ASP.NET 3.5
- 12.2.1. Setting Up Your Provider to Work with Microsoft SQL Server 7.0, 2000, 2005, or 2008
- 12.2.2. Membership Providers
- 12.2.3. Role Providers
- 12.2.4. The Personalization Provider
- 12.2.5. The SiteMap Provider
- 12.2.6. SessionState Providers
-
12.2.7. Web Event Providers
- 12.2.7.1. System.Web.Management.EventLogWebEventProvider
- 12.2.7.2. System.Web.Management.SimpleMailWebEventProvider
- 12.2.7.3. System.Web.Management.TemplatedMailWebEventProvider
- 12.2.7.4. System.Web.Management.SqlWebEventProvider
- 12.2.7.5. System.Web.Management.TraceWebEventProvider
- 12.2.7.6. System.Web.Management.WmiWebEventProvider
- 12.2.8. Configuration Providers
- 12.2.9. The WebParts Provider
- 12.3. Configuring Providers
- 12.4. Summary
-
13. Extending the Provider Model
- 13.1. Providers Are One Tier in a Larger Architecture
- 13.2. Modifying Through Attribute-Based Programming
- 13.3. Examining ProviderBase
-
13.4. Building Your Own Providers
- 13.4.1. Creating the CustomProviders Application
- 13.4.2. Constructing the Class Skeleton Required
- 13.4.3. Creating the XML User Data Store
- 13.4.4. Defining the Provider Instance in the web.config File
- 13.4.5. Not Implementing Methods and Properties of the MembershipProvider Class
- 13.4.6. Implementing Methods and Properties of the MembershipProvider Class
- 13.4.7. Using the XmlMembershipProvider for User Login
- 13.5. Extending Pre-Existing Providers
- 13.6. Summary
-
14. Site Navigation
- 14.1. XML-Based Site Maps
- 14.2. SiteMapPath Server Control
-
14.3. TreeView Server Control
- 14.3.1. Identifying the TreeView Control's Built-In Styles
- 14.3.2. Examining the Parts of the TreeView Control
- 14.3.3. Binding the TreeView Control to an XML File
- 14.3.4. Selecting Multiple Options in a TreeView
- 14.3.5. Specifying Custom Icons in the TreeView Control
- 14.3.6. Specifying Lines Used to Connect Nodes
- 14.3.7. Working with the TreeView Control Programmatically
- 14.4. Menu Server Control
- 14.5. SiteMap Data Provider
- 14.6. SiteMap API
- 14.7. URL Mapping
- 14.8. Sitemap Localization
- 14.9. Security Trimming
- 14.10. Nesting SiteMap Files
- 14.11. Summary
-
15. Personalization
- 15.1. The Personalization Model
-
15.2. Creating Personalization Properties
- 15.2.1. Adding a Simple Personalization Property
- 15.2.2. Using Personalization Properties
- 15.2.3. Adding a Group of Personalization Properties
- 15.2.4. Using Grouped Personalization Properties
- 15.2.5. Defining Types for Personalization Properties
- 15.2.6. Using Custom Types
- 15.2.7. Providing Default Values
- 15.2.8. Making Personalization Properties Read-Only
- 15.3. Anonymous Personalization
- 15.4. Programmatic Access to Personalization
- 15.5. Personalization Providers
- 15.6. Managing Application Profiles
- 15.7. Summary
-
16. Membership and Role Management
- 16.1. Authentication
- 16.2. Authorization
-
16.3. ASP.NET 3.5 Authentication
- 16.3.1. Setting Up Your Web Site for Membership
-
16.3.2. Adding Users
- 16.3.2.1. Using the CreateUserWizard Server Control
- 16.3.2.2. Seeing Where Users Are Stored
- 16.3.2.3. Working with the CreateUserWizard Control
- 16.3.2.4. Incorporating Personalization Properties in the Registration Process
- 16.3.2.5. Adding Users Programmatically
- 16.3.2.6. Changing How Users Register with Your Application
- 16.3.3. Asking for Credentials
- 16.3.4. Working with Authenticated Users
- 16.3.5. Showing the Number of Users Online
- 16.3.6. Dealing with Passwords
-
16.4. ASP.NET 3.5 Authorization
- 16.4.1. Using the LoginView Server Control
- 16.4.2. Setting Up Your Web Site for Role Management
- 16.4.3. Adding and Retrieving Application Roles
- 16.4.4. Deleting Roles
- 16.4.5. Adding Users to Roles
- 16.4.6. Getting All the Users of a Particular Role
- 16.4.7. Getting All the Roles of a Particular User
- 16.4.8. Removing Users from Roles
- 16.4.9. Checking Users in Roles
- 16.4.10. Understanding How Roles Are Cached
- 16.5. Using the Web Site Administration Tool
- 16.6. Public Methods of the Membership API
- 16.7. Public Methods of the Roles API
- 16.8. Summary
-
17. Portal Frameworks and Web Parts
- 17.1. Introducing Web Parts
- 17.2. Building Dynamic and Modular Web Sites
- 17.3. Working with Classes in the Portal Framework
- 17.4. Creating Custom Web Parts
- 17.5. Connecting Web Parts
- 17.6. Summary
-
18. HTML and CSS Design with ASP.NET
- 18.1. Caveats
-
18.2. HTML and CSS Overview
- 18.2.1. Introducing CSS
- 18.2.2. Creating Style Sheets
- 18.2.3. CSS Rules
- 18.2.4. CSS Inheritance
- 18.2.5. Element Layout and Positioning
- 18.2.6. Working with HTML and CSS in Visual Studio
- 18.2.7. ASP.NET 2.0 CSS-Friendly Control Adapters
- 18.3. Summary
-
19. ASP.NET AJAX
- 19.1. Understanding the Need for AJAX
- 19.2. ASP.NET AJAX and Visual Studio 2008
- 19.3. ASP.NET AJAX Applications
- 19.4. ASP.NET AJAX's Server-Side Controls
- 19.5. Using Multiple UpdatePanel Controls
- 19.6. Working with Page History
- 19.7. Script Combining
- 19.8. Summary
-
20. ASP.NET AJAX Control Toolkit
- 20.1. Downloading and Installing
-
20.2. The ASP.NET AJAX Controls
- 20.2.1. ASP.NET AJAX Control Toolkit Extenders
- 20.2.2. AlwaysVisibleControlExtender
- 20.2.3. AnimationExtender
- 20.2.4. AutoCompleteExtender
- 20.2.5. CalendarExtender
- 20.2.6. CollapsiblePanelExtender
- 20.2.7. ConfirmButtonExtender and ModalPopupExtender
- 20.2.8. DragPanelExtender
- 20.2.9. DropDownExtender
- 20.2.10. DropShadowExtender
- 20.2.11. DynamicPopulateExtender
- 20.2.12. FilteredTextBoxExtender
- 20.2.13. HoverMenuExtender
- 20.2.14. ListSearchExtender
- 20.2.15. MaskedEditExtender and MaskedEditValidator
- 20.2.16. MutuallyExclusiveCheckBoxExtender
- 20.2.17. NumericUpDownExtender
- 20.2.18. PagingBulletedListExtender
- 20.2.19. PopupControlExtender
- 20.2.20. ResizableControlExtender
- 20.2.21. RoundedCornersExtender
- 20.2.22. SliderExtender
- 20.2.23. SlideShowExtender
- 20.2.24. TextBoxWatermarkExtender
- 20.2.25. ToggleButtonExtender
- 20.2.26. UpdatePanelAnimationExtender
- 20.2.27. ValidatorCalloutExtender
- 20.3. ASP.NET AJAX Control Toolkit Server Controls
- 20.4. Summary
-
21. Security
- 21.1. Authentication and Authorization
-
21.2. Applying Authentication Measures
- 21.2.1. The <authentication> Node
-
21.2.2. Windows-Based Authentication
- 21.2.2.1. Creating Users
- 21.2.2.2. Authenticating and Authorizing a User
- 21.2.2.3. Looking Closely at the <allow> and <deny> Nodes
- 21.2.2.4. Authenticating and Authorizing a Group
- 21.2.2.5. Authenticating and Authorizing an HTTP Transmission Method
- 21.2.2.6. Integrated Windows Authentication
- 21.2.2.7. Basic Authentication
- 21.2.2.8. Digest Authentication
- 21.2.3. Forms-Based Authentication
- 21.2.4. Passport Authentication
- 21.3. Authenticating Specific Files and Folders
- 21.4. Programmatic Authorization
- 21.5. Identity and Impersonation
- 21.6. Securing Through IIS
- 21.7. Summary
-
22. State Management
- 22.1. What Are Your Choices?
-
22.2. Understanding the Session Object in ASP.NET
- 22.2.1. Sessions and the Event Model
- 22.2.2. Configuring Session State Management
- 22.2.3. In-Process Session State
- 22.2.4. Out-of-Process Session State
- 22.2.5. SQL-Backed Session State
- 22.2.6. Extending Session State with Other Providers
- 22.2.7. Cookieless Session State
- 22.2.8. Choosing the Correct Way to Maintain State
- 22.3. The Application Object
- 22.4. QueryStrings
- 22.5. Cookies
- 22.6. PostBacks and Cross-Page PostBacks
- 22.7. Hidden Fields, ViewState, and ControlState
- 22.8. Using HttpContext.Current.Items for Very Short-Term Storage
- 22.9. Summary
-
23. Caching
- 23.1. Caching
- 23.2. Caching Programmatically
-
23.3. Using the SQL Server Cache Dependency
- 23.3.1. Enabling Databases for SQL Server Cache Invalidation
- 23.3.2. Enabling Tables for SQL Server Cache Invalidation
- 23.3.3. Looking at SQL Server 2000
- 23.3.4. Looking at the Tables That Are Enabled
- 23.3.5. Disabling a Table for SQL Server Cache Invalidation
- 23.3.6. Disabling a Database for SQL Server Cache Invalidation
- 23.3.7. SQL Server 2005 Cache Invalidation
- 23.4. Configuring Your ASP.NET Application
- 23.5. Testing SQL Server Cache Invalidation
- 23.6. Summary
-
24. Debugging and Error Handling
- 24.1. Design-Time Support
- 24.2. Tracing
- 24.3. Debugging
- 24.4. Exception and Error Handling
- 24.5. Summary
-
25. File I/O and Streams
- 25.1. Working with Drives, Directories, and Files
- 25.2. Reading and Writing Files
- 25.3. Working with Serial Ports
- 25.4. Network Communications
- 25.5. Summary
-
26. User and Server Controls
- 26.1. User Controls
-
26.2. Server Controls
- 26.2.1. WebControl Project Setup
- 26.2.2. Control Attributes
- 26.2.3. Control Rendering
- 26.2.4. Adding Tag Attributes
- 26.2.5. Styling HTML
- 26.2.6. Themes and Skins
- 26.2.7. Adding Client-Side Features
- 26.2.8. Detecting and Reacting to Browser Capabilities
- 26.2.9. Using ViewState
- 26.2.10. Raising PostBack Events
- 26.2.11. Handling PostBack Data
- 26.2.12. Composite Controls
- 26.2.13. Templated Controls
- 26.2.14. Creating Control Design-Time Experiences
- 26.3. Summary
- 27. Modules and Handlers
- 28. Using Business Objects
- 29. ADO.NET Entity Framework
- 30. ASP.NET Dynamic Data
-
31. Building and Consuming Services
- 31.1. Communication Between Disparate Systems
- 31.2. Building a Simple XML Web Service
- 31.3. Consuming a Simple XML Web Service
- 31.4. Transport Protocols for Web Services
- 31.5. Overloading WebMethods
- 31.6. Caching Web Service Responses
- 31.7. SOAP Headers
- 31.8. Consuming Web Services Asynchronously
- 31.9. Windows Communication Foundation
- 31.10. Building the WCF Consumer
- 31.11. Summary
- 32. ADO.NET Data Services
- 33. Localization
-
34. Configuration
- 34.1. Configuration Overview
-
34.2. Common Configuration Settings
- 34.2.1. Connecting Strings
- 34.2.2. Configuring Session State
- 34.2.3. Compilation Configuration
- 34.2.4. Browser Capabilities
- 34.2.5. Custom Errors
- 34.2.6. Authentication
- 34.2.7. Anonymous Identity
- 34.2.8. Authorization
- 34.2.9. Locking-Down Configuration Settings
- 34.2.10. ASP.NET Page Configuration
- 34.2.11. Include Files
- 34.2.12. Configuring ASP.NET Runtime Settings
- 34.2.13. Configuring the ASP.NET Worker Process
- 34.2.14. Storing Application-Specific Settings
- 34.2.15. Programming Configuration Files
- 34.2.16. Protecting Configuration Settings
- 34.2.17. Editing Configuration Files
- 34.3. Creating Custom Sections
- 34.4. Summary
-
35. Instrumentation
- 35.1. Working with the Event Log
- 35.2. Using Performance Counters
- 35.3. Application Tracing
- 35.4. Understanding Health Monitoring
- 35.5. Summary
- 36. Administration and Management
-
37. Packaging and Deploying ASP.NET Applications
- 37.1. Deployment Pieces
- 37.2. Steps to Take before Deploying
- 37.3. Methods of Deploying Web Applications
- 37.4. Looking More Closely at Installer Options
- 37.5. Summary
-
A. Migrating Older ASP.NET Projects
- A.1. Migrating Is Not Difficult
- A.2. When Mixing Versions — Forms Authentication
- A.3. Upgrading — ASP.NET Reserved Folders
- A.4. ASP.NET 3.5 Pages Come as XHTML
- A.5. No Hard-Coded .js Files in ASP.NET 3.5
- A.6. Converting ASP.NET 1.x Applications in Visual Studio 2008
- A.7. Migrating from ASP.NET 2.0 to 3.5
- B. ASP.NET Ultimate Tools
- C. Silverlight 2 and ASP.NET
- D. ASP.NET Is Greater Than ASP.NET MVC
- E. ASP.NET Online Resources
Product information
- Title: Professional ASP.NET 3.5 SP1 Edition: In C# and VB
- Author(s):
- Release date: April 2009
- Publisher(s): Wrox
- ISBN: 9780470478264
You might also like
book
Beginning ASP.NET 3.5: In C# and VB
This book is for anyone who wants to learn how to build rich and interactive web …
book
Beginning ASP.NET 4: in C# and VB
This book is for anyone who wants to learn how to build rich and interactive web …
book
Beginning ASP.NET 4.5 in VB
This book is the most comprehensive and up to date introduction to ASP.NET ever written. Focusing …
book
Build Your Own ASP.NET 4 Web Site Using C# & VB, 4th Edition
Build Your Own ASP.NET 4 Web Site Using C# & VB is aimed at beginner ASP.NET …