Available:*
Library | Item Barcode | Call Number | Material Type | Item Category 1 | Status |
---|---|---|---|---|---|
Searching... | 30000010125905 | TK5105.888 K38 2005 | Open Access Book | Book | Searching... |
On Order
Summary
Summary
What is this book about?
With help from Microsoft ASP.NET insider Bradley Millington, John Kaufman covers both VB.NET and C# coding for ASP.NET databases so you don't have to decide up front which language you want more and retailers no longer have to manage inventory on separate language versions.
What does this book cover?
This edition is completely written from scratch on the ASP.NET "Whidbey" Beta to ensure the coverage is most appropriate for this greatly changed version.
The book focuses on solving business problems in a logical progression, from connecting to displaying to changing the data. Additional chapters cover enhancements to the presentation and alternate types of data. The book follows the practice of going beyond the basic techniques to discuss the permutations, pitfalls, and best practices that occur in real business scenarios.
Author Notes
John Kauffman has written numerous books about ASP and the incorporation of data into ASP pages. Born in Philadelphia and educated at Penn State, he has lived, taught, and programmed on three continents as he follows his wife's diplomatic assignments.
When not writing, he spends his time sailing, teaching electronics to high school groups, and chauffeuring his kids to hockey and music practices.
Table of Contents
Foreword | p. xvii |
Introduction | p. xxi |
Chapter 1 Introduction to ASP.NET 2.0 and ADO.NET | p. 1 |
Overview of the Technologies | p. 2 |
Introduction to the .NET Framework | p. 2 |
Introduction to ASP.NET | p. 4 |
Introduction to ASP.NET 2.0 | p. 5 |
Introduction to ADO.NET | p. 7 |
ASP.NET 2.0 and Data Access | p. 8 |
Review of Terminology | p. 9 |
Setup Requirements for This Book | p. 11 |
Install a Web Server | p. 12 |
Install the .NET Framework Version 2.0 | p. 12 |
Install an Editor to Create Web Pages | p. 13 |
Visual Studio | p. 13 |
Visual Web Developer Express | p. 13 |
Notepad and Other Editors | p. 14 |
Install a Database Management System | p. 14 |
Microsoft Access | p. 15 |
Microsoft SQL Server | p. 15 |
Other Relational Databases | p. 15 |
SQL Server Express | p. 15 |
Setup | p. 16 |
Install the Sample Databases | p. 17 |
Demonstrations | p. 18 |
Summary | p. 27 |
Exercises | p. 28 |
Chapter 2 Connecting to an Access Database | p. 29 |
Microsoft Access and the JET Database Engine | p. 30 |
Connecting to a Microsoft Access Database in Visual Web Developer | p. 30 |
The AccessDataSource Control | p. 33 |
Variations in Select Statements | p. 36 |
Variations in MDB File Location | p. 40 |
Handling File Permissions | p. 41 |
Handling Access Connection Failures | p. 42 |
A Few Notes on Using Access in Web Applications | p. 45 |
Common Mistakes with AccessDataSource Controls | p. 46 |
Summary | p. 47 |
Exercises | p. 48 |
Chapter 3 Connecting to SQL Server and SQL Server Express | p. 49 |
Introduction to SQL Server and Connection Strings | p. 50 |
Preparing to Use a SQL Server Database | p. 51 |
Connection Strings | p. 51 |
Using the SqlDataSource Control | p. 53 |
Understanding Security in SQL Server | p. 57 |
Storing the Connection String in the Web.Config File | p. 59 |
Discovering the Structure of an Unfamiliar Database | p. 64 |
Handling Connection Failures with the SqlDataSource | p. 66 |
Common Mistakes | p. 69 |
Summary | p. 69 |
Exercises | p. 71 |
Chapter 4 Connecting to Other Relational Databases | p. 73 |
Introduction to Connections with Providers | p. 73 |
Relationship between Layers of Connectivity Software | p. 74 |
Supported ADO.NET Providers | p. 75 |
Using Providers in ASP.NET 2.0 | p. 76 |
Connecting to Access When a Password Is Used | p. 78 |
Connecting to an MDB with a Security Scheme | p. 79 |
Connecting to Oracle | p. 83 |
Theory and Syntax | p. 83 |
Connecting to MySQL | p. 84 |
Theory of a Connection to MySQL | p. 84 |
Syntax for an ODBC Connection to MySQL | p. 84 |
Connecting to Other Databases | p. 86 |
Common Mistakes | p. 87 |
Summary | p. 87 |
Exercises | p. 88 |
Chapter 5 Displaying Data in Tables | p. 89 |
Displaying Data in ASP.NET 2.0 | p. 90 |
Review of Data-Bound and Data Source Controls | p. 90 |
Types of Data-Bound Controls | p. 90 |
Introduction to the GridView Control | p. 91 |
Capabilities of the GridView Control | p. 91 |
GridView Rendering Elements | p. 92 |
Connecting a GridView to Data | p. 92 |
Drag and Drop Fields from Data Explorer | p. 93 |
Drag and Drop Controls from Toolbox | p. 93 |
Customizing the GridView's Columns | p. 95 |
Selecting Columns in the Edit Columns Dialog | p. 95 |
Types of Column Fields | p. 96 |
Bound Field | p. 96 |
CheckBox Field | p. 97 |
HyperLink Field | p. 99 |
Image Field | p. 102 |
Command Field | p. 102 |
Button Field | p. 104 |
Template Field | p. 107 |
AutoGenerateColumns Property of the GridView | p. 110 |
Handling Null Field Values | p. 111 |
The DetailsView Control | p. 112 |
DetailsView Rendering Elements | p. 112 |
Connecting the DetailsView to Data | p. 113 |
Common Mistakes | p. 115 |
Summary | p. 115 |
Chapter 6 Customizing the Appearance of Tables | p. 117 |
Customizing Appearance | p. 118 |
BackColor and BackImageUrl | p. 118 |
Font and ForeColor | p. 119 |
Height and Width | p. 119 |
CellSpacing and CellPadding | p. 120 |
Borders and GridLines | p. 120 |
HorizontalAlign | p. 122 |
ShowHeader and ShowFooter | p. 122 |
ToolTip | p. 122 |
Customizing Individual Styles | p. 124 |
GridView and DetailsView Styles | p. 124 |
Empty Tables | p. 126 |
DetailsView-Specific Styles | p. 128 |
Column Styles and Field Styles | p. 129 |
Using Cascading Style Sheets | p. 131 |
Precedence of Styles | p. 135 |
Themes and Skins | p. 138 |
Using Auto Format in Visual Studio | p. 140 |
Common Mistakes | p. 140 |
Summary | p. 141 |
Exercises | p. 142 |
Chapter 7 Paging and Sorting Data | p. 143 |
Sorting | p. 144 |
Requirements to Enable Sorting | p. 145 |
Sort Expressions | p. 147 |
Paging | p. 151 |
Enabling Paging | p. 152 |
Customizing Paging and the Pager | p. 153 |
Paging Theory and Alternatives | p. 158 |
Relationship of Sorting, Paging, and Selecting | p. 158 |
Common Mistakes | p. 159 |
Summary | p. 160 |
Exercises | p. 160 |
Chapter 8 Displaying Data in Lists | p. 161 |
Introduction | p. 162 |
Transition from GridView to Other Formats | p. 162 |
Types of List Controls | p. 163 |
Concepts Common to List Controls | p. 163 |
Text versus Value in List Items | p. 164 |
Data-Binding List Controls | p. 165 |
DataTextField and DataValueField | p. 165 |
DropDownList Control | p. 169 |
Handling Selection in a List | p. 169 |
SelectedIndex and SelectedValue | p. 169 |
Automatic Postback | p. 171 |
Common Mistakes | p. 173 |
Summary | p. 174 |
Chapter 9 Filtering and Master-Child Data | p. 175 |
Filtering GridView Records Using a QueryString | p. 177 |
Filtering GridView Records Using a TextBox | p. 179 |
Using the SQL LIKE Operator | p. 181 |
The Theory of Selection and ControlParameters | p. 182 |
Filtering GridView Records Using a List Control | p. 184 |
Master Control by DropDownList with Hard-Coded Items | p. 184 |
Master Control by List Boxes with Data-Bound Items | p. 185 |
Master Control by List Boxes with a Default Setting That Initially Hides the GridView | p. 187 |
Displaying Details Using a GridView and DetailsView on the Same Page | p. 191 |
Displaying Details Using a GridView and DetailsView on Different Pages | p. 195 |
Cascading DropDownLists | p. 200 |
Common Mistakes | p. 201 |
Summary | p. 201 |
Exercises | p. 202 |
Chapter 10 Displaying Data in Templated Controls | p. 205 |
Using Templated Controls | p. 209 |
Data Binding in Templates | p. 209 |
Content Suitable for Addition to a Template | p. 210 |
GridView and DetailsView Template Fields | p. 211 |
DataList Control | p. 214 |
Repeater Control | p. 219 |
DetailsView Control | p. 220 |
Navigation in Templated Controls | p. 220 |
FormView Control | p. 221 |
Comparing and Selecting the Templated Controls | p. 223 |
Common Mistakes | p. 225 |
Summary | p. 226 |
Exercises | p. 227 |
Chapter 11 Updating and Deleting Data | p. 229 |
Overview of Modifying | p. 230 |
Command Fields | p. 231 |
Simple Update | p. 233 |
DataKeyNames and Updates | p. 236 |
Update in a DetailsView | p. 238 |
Parameters Collections | p. 239 |
Handling NULLs in Updates | p. 240 |
Delete to Remove Entire Records | p. 242 |
Common Mistakes | p. 244 |
Summary | p. 245 |
Exercises | p. 245 |
Chapter 12 Inserting New Records | p. 247 |
Support for Insert | p. 248 |
What Happens under the Hood? | p. 248 |
Setup for Insert | p. 249 |
Insertion Mode | p. 249 |
Action Performed by ASP.NET 2.0 on Insert | p. 249 |
Database Considerations When Inserting | p. 249 |
Basic Insert Using DetailsView | p. 250 |
Enabling Insert in a Data Source Control | p. 252 |
DetailsView INSERT Starting from GridView | p. 254 |
GridView and DetailsView for Insert on Same Page | p. 254 |
GridView on One Page with DetailsView on a Second Page | p. 254 |
Insert Using Template Fields | p. 255 |
Using the Bind Syntax in InsertltemTemplate | p. 256 |
Data Entry with RadioButtonLists and DropDownLists | p. 257 |
Data Entry with Check Boxes | p. 260 |
Inserting with FormView | p. 261 |
Common Mistakes | p. 265 |
Summary | p. 265 |
Chapter 13 Business Objects as a Source of Data | p. 267 |
Introduction | p. 267 |
Layers of an N-Tier Application | p. 268 |
Presentation Layer | p. 268 |
Business Logic Layer | p. 268 |
Data Access Layer | p. 268 |
Advantages of N-Tier Architectures | p. 269 |
Building a Data Access Logic Layer Using VS DataSets | p. 269 |
Creating a Data Access Logic Layer Using the VS DataSet Designer | p. 269 |
Data-Binding to a DataSet | p. 272 |
Implementing Master Details Capability | p. 273 |
Implementing and Data-Binding to Custom Objects | p. 277 |
Implementing Sorting in a Custom Object | p. 284 |
Common Mistakes | p. 288 |
Summary | p. 288 |
Chapter 14 XML and Other Hierarchical Data | p. 289 |
What Is Hierarchical Data? | p. 290 |
Types of Hierarchical Data? | p. 290 |
ASP.NET 2.0 Hierarchical Data Controls | p. 290 |
XmIDataSource Control | p. 291 |
TreeView Control to Display Hierarchical Data | p. 291 |
Display XML Data | p. 294 |
XPath with XmIDataSource | p. 294 |
Formatting the TreeView | p. 297 |
XSL Transformation with XML | p. 300 |
Handling Events in a TreeView Control | p. 303 |
Hierarchical Data with Controls Other Than TreeView | p. 305 |
XML and GridView | p. 306 |
Use XML Source with DataList | p. 308 |
Use XPath to Display Data in a DataList Control | p. 310 |
XML and DataList with Nesting | p. 312 |
Common Mistakes with XmIDataSource Controls | p. 315 |
Summary | p. 315 |
Chapter 15 Caching Data | p. 317 |
Caching and Its Benefits | p. 317 |
When to Use Caching | p. 318 |
Understanding State | p. 319 |
Understanding State Staleness | p. 319 |
Caching Options in ASP.NET 2.0 | p. 319 |
Displaying Data in ASP.NET | p. 320 |
Time-Based Caching | p. 323 |
Caching with Parameters | p. 325 |
Implementing Filtering Capability | p. 327 |
SQL Cache Invalidation | p. 330 |
Caching Partial Pages | p. 334 |
Common Mistakes | p. 337 |
Summary | p. 337 |
Chapter 16 Handling Events for Data Controls | p. 339 |
Execution Control When an Event Is Triggered | p. 340 |
Types of Events | p. 340 |
General Techniques for Writing Event Handlers | p. 341 |
Transfer of Values When an Event Is Triggered | p. 344 |
Object Sender | p. 345 |
EventArgs | p. 345 |
Location of Event Handlers | p. 346 |
Command and Custom Button Events | p. 350 |
Using Events Raised by Command Buttons (Command Fields) | p. 351 |
Using Events Raised by Buttons with Custom Behavior | p. 351 |
List Selection and Page Events | p. 353 |
Data Control Binding Events | p. 356 |
General Error Events | p. 358 |
Common Mistakes | p. 361 |
Summary | p. 362 |
Exercises | p. 362 |
Appendix A A Short and Practical Introduction to SQL Statements | p. 363 |
Appendix B Exercise Answers | p. 375 |
Index | p. 391 |