Figure 1.1. | Combining a Master Page and a child page 3 |
Figure 1.2. | The Login control 7 |
Figure 1.3. | A skinned Login control 8 |
Figure 1.4. | Sample intranet site using the portal framework 12 |
Figure 1.5. | Dragging a WebPart to another location 13 |
Figure 1.6. | The built-in editing features for a WebPart 14 |
Figure 1.7. | Enabling ASP.NET 2.0 in IIS 20 |
Figure 1.8. | Creating a separate application pool 21 |
Figure 1.9. | Placing a Web Site in an application pool 22 |
Figure 2.1. | Connecting to a database 25 |
Figure 2.2. | Opening an existing Web site 26 |
Figure 2.3. | Creating a data display page with drag and drop in Visual Studio 2005 27 |
Figure 2.4. | Opening the Tasks pane in Visual Studio and Visual Web Developer 28 |
Figure 2.5. | Modifying the columns displayed by the GridView control 29 |
Figure 2.6. | Enabling sorting and paging in the GridView tasks pane 30 |
Figure 2.7. | Applying an Auto Format to the GridView control 30 |
Figure 2.8. | Enabling editing in the tasks pane of a GridView control 31 |
Figure 2.9. | Editing the rows in the GridView control 31 |
Figure 2.10. | Setting the properties of the new SqlDataSource to select the category details 32 |
Figure 2.11. | Setting the properties of the new DropDownList control 33 |
Figure 2.12. | Adding a WHERE clause to select on subcategory 34 |
Figure 2.13. | Filtering the rows by category using a DropDownList and ControlParameter 35 |
Figure 2.14. | Specifying selection without editing features for a GridView control 36 |
Figure 2.15. | Creating a ControlParameter for the third SqlDataSource control 37 |
Figure 2.16. | Specifying the options to allow row updates through controls linked to this SqlDataSource 38 |
Figure 2.17. | Setting the editing options for the DetailsView control 39 |
Figure 2.18. | Viewing and editing rows in a linked DetailsView control 42 |
Figure 2.19. | Configuring the ObjectDataSource for the DropDownList 43 |
Figure 2.20. | Configuring the ObjectDataSource for the GridView 43 |
Figure 2.21. | Connecting the data display controls to the ObjectDataSource instances 44 |
Figure 2.22. | The results from using a data access/business logic layer 45 |
Figure 2.23. | The AdventureWorks Master Page in Design View in Visual Studio 47 |
Figure 2.24. | The new page running within the Master Page 50 |
Figure 2.25. | Adding a SiteMapDataSource and menu control to the Master Page 51 |
Figure 2.26. | Adding a menu and a navigation trail to the Master Page 52 |
Figure 3.1. | The Visual Studio 2005 Server Explorer 58 |
Figure 3.2. | The Visual Web Developer Database Explorer 59 |
Figure 3.3. | Adding a WHERE clause to a SqlDataSource control 65 |
Figure 3.4. | Selecting the parameter type 66 |
Figure 3.5. | Selecting the source of the parameter data 67 |
Figure 3.6. | Adding data modification to the SqlDataSource control 71 |
Figure 3.7. | Mapping the parameters into the command 72 |
Figure 3.8. | GridView Tasks pane 74 |
Figure 3.9. | A GridView in edit mode 75 |
Figure 3.10. | The default pager 76 |
Figure 3.11. | A GridView with a mixture of column types 95 |
Figure 3.12. | Showing a single row with a DetailsView control 96 |
Figure 3.13. | TemplateColumns with DropDownLists 99 |
Figure 3.14. | The DetailsView in standalone mode 100 |
Figure 3.15. | The FormView control in normal, insert, and edit modes 102 |
Figure 4.1. | Three- and four-tier architectures 107 |
Figure 4.2. | Choosing a business object 117 |
Figure 4.3. | Defining the data methods 118 |
Figure 4.4. | Defining the parameters for a Select method 120 |
Figure 4.5. | Master Details using ObjectDataSource controls 120 |
Figure 4.6. | Adding a DataSet 122 |
Figure 4.7. | Defining the SQL statement for the DataSet 123 |
Figure 4.8. | The Advanced Options of DataSet configuration 123 |
Figure 4.9. | Generating the DataSet methods 124 |
Figure 4.10. | The DataSet Designer 125 |
Figure 4.11. | Selecting the CustomersTableAdapter 129 |
Figure 4.12. | Viewing the CommandText of the UpdateCommand 130 |
Figure 4.13. | Using the Query Builder to modify commands 131 |
Figure 5.1. | The extracted Identity value 139 |
Figure 5.2. | Configuring optimistic concurrency 146 |
Figure 5.3. | An Edit page with conflict detection 149 |
Figure 5.4. | An Edit page with improved conflict detection 151 |
Figure 5.5. | Capturing weather information asynchronously 154 |
Figure 5.6. | Creating a SQL Server Project 169 |
Figure 5.7. | The SQL Server 2005 Object Explorer 171 |
Figure 5.8. | Viewing the dependencies for an assembly 172 |
Figure 5.9. | Adding a UDT column to a table 173 |
Figure 5.10. | Databinding with UDT columns 175 |
Figure 6.1. | Control caching in action 191 |
Figure 6.2. | The Move toward managed execution 197 |
Figure 6.3. | Enabling a database for SQL cache invalidation 207 |
Figure 6.4. | Enabling a table for SQL cache invalidation 208 |
Figure 7.1. | Editing XML in Visual Studio 2005 220 |
Figure 7.2. | The Shippers schema 221 |
Figure 7.3. | The schema designer 221 |
Figure 7.4. | Binding a TreeView to XML files 225 |
Figure 7.5. | TreeView with explicit binding 226 |
Figure 7.6. | Nested binding with expressions 229 |
Figure 7.7. | Setting the Input file for XSLT 234 |
Figure 7.8. | Debugging XSLT 234 |
Figure 7.9. | Nodes, types, and values of the Shippers document 240 |
Figure 7.10. | Nodes, types, and values for Shippers Attributes document 240 |
Figure 7.11. | Unformatted XML 242 |
Figure 7.12. | Formatted XML 243 |
Figure 7.13. | Using the XmlDataDocument's DataSet 247 |
Figure 7.14. | Access to and conversion of relational data as XML 248 |
Figure 7.15. | Specifying the schema for an XML column 251 |
Figure 8.1. | The Panel control example 263 |
Figure 8.2. | The dynamically generated Table control with the Headers attributes set on each cell 267 |
Figure 8.3. | Using the ImageMap control to create a clickable image map 270 |
Figure 8.4. | The TreeView example page showing the results of clicking a Trim node and then hovering over a Car node 274 |
Figure 8.5. | Displaying information about an uploaded file using the FileUpload control 275 |
Figure 8.6. | Client-side validation when an error is encountered 279 |
Figure 8.7. | Server-side validation when an error is encountered 280 |
Figure 8.8. | Displaying a message box on the client to indicate validation errors 285 |
Figure 8.9. | Examples of the output generated by the BulletedList control 288 |
Figure 8.11. | Working with the ListBox and DropDownList controls 291 |
Figure 8.12. | The Calendar control with a full week selected 297 |
Figure 8.13. | An example of using the Wizard control 299 |
Figure 9.1. | The contents of the Request properties and collections 314 |
Figure 9.2. | Some of the Response properties shown at the bottom of the example page 315 |
Figure 9.3. | Using the encoding and decoding methods of the HttpServerUtility class 318 |
Figure 9.4. | Querying and setting some properties of the Page class 322 |
Figure 9.5. | Listing the controls in the page with a TreeView control 327 |
Figure 9.6. | A list of all the Label controls within the page's control tree 329 |
Figure 9.7. | The trace output showing the messages created by the event handlers 335 |
Figure 9.8. | Fetching the time from the server asynchronously 338 |
Figure 9.9. | Using a single Master Page and two Content Pages 346 |
Figure 9.10. | Using multiple nested Master Pages 347 |
Figure 10.1. | Displaying the CommandName and CommandArgument in the RowCommand event of the GridView 362 |
Figure 10.2. | Using the CommandArgument property of a ButtonField in the RowCommand event of the GridView 364 |
Figure 10.3. | Using the OnClientClick property of a LinkButton control 366 |
Figure 10.4. | Using the HttpServerUtility.Execute method to execute another page 372 |
Figure 10.5. | Displaying the HTML content of the target page 373 |
Figure 10.6. | Displaying the HTML-encoded content of the target page 373 |
Figure 10.7. | The result of a standard postback 379 |
Figure 10.8. | The result of a cross-page postback 381 |
Figure 10.9. | Using a SiteMapDataSource and Menu control in Visual Studio 2005 384 |
Figure 10.10. | The Menu control in both horizontal and vertical modes 385 |
Figure 10.11. | The TreeView control with an auto-format applied 385 |
Figure 10.12. | The SiteMapPath control in action 387 |
Figure 10.13. | A SiteMapPath control using an image as the separator 387 |
Figure 10.14. | The effects of handling the DataBound events in the navigation controls 392 |
Figure 11.1. | The ASP.NET Web Site Administration Tool 397 |
Figure 11.2. | The Access control settings in Internet Information Server 399 |
Figure 11.3. | The ASP.NET Application Database schema 409 |
Figure 11.4. | Selecting the database configuration option 416 |
Figure 11.5. | Specifying the database server location, authentication, and name 417 |
Figure 11.6. | Confirming your settings 418 |
Figure 11.7. | Starting the ASP.NET Web Site Administration Tool 420 |
Figure 11.8. | Selecting the Provider Configuration page 421 |
Figure 11.9. | Specifying single or multiple providers 422 |
Figure 11.10. | Selecting an installed provider 422 |
Figure 11.11. | Verifying the provider database connection 423 |
Figure 11.12. | The Security Wizard Welcome screen 424 |
Figure 11.13. | Selecting the access method 425 |
Figure 11.14. | The provider settings screen 426 |
Figure 11.15. | Enabling roles for the Web site 427 |
Figure 11.16. | Adding a new role 428 |
Figure 11.17. | Viewing new and existing roles 429 |
Figure 11.18. | Signing up for a new user account 430 |
Figure 11.19. | The account created screen 431 |
Figure 11.20. | Allowing access for specific roles 432 |
Figure 11.21. | Allowing access for specific users 433 |
Figure 11.22. | Denying all users access to a folder 434 |
Figure 11.23. | The security configuration page 435 |
Figure 11.24. | Viewing and managing users 435 |
Figure 11.25. | Viewing and managing roles 436 |
Figure 11.26. | Viewing and managing access control settings 436 |
Figure 11.27. | Creating and managing roles 437 |
Figure 11.28. | Selecting a role to manage 438 |
Figure 11.29. | Finding the users to add to a role 439 |
Figure 11.30. | Placing users in a role 439 |
Figure 11.31. | Specifying mail server details 440 |
Figure 11.32. | Viewing the contents of the application database 441 |
Figure 11.33. | The security server controls in the Visual Studio Toolbox 444 |
Figure 11.34. | The Home page containing LoginView, LoginStatus, and LoginName controls 445 |
Figure 11.35. | Viewing the Home page when not logged in 446 |
Figure 11.36. | The Login page containing a Login and PasswordRecovery control 447 |
Figure 11.37. | The Login page displayed when trying to access the SecureArea folder 448 |
Figure 11.38. | A password reminder e-mail 448 |
Figure 11.39. | The SecureArea containing LoginStatus, LoginName, and ChangePassword controls 449 |
Figure 11.40. | Changing your password in the SecureArea page after a successful login 450 |
Figure 11.41. | The Home page when the user is logged in 451 |
Figure 11.42. | The New User page containing a CreateUserWizard control 452 |
Figure 11.43. | Signing up for an account in the New User page 453 |
Figure 12.1. | The ASP.NET SQL Server Setup Wizard 463 |
Figure 12.2. | The shopping cart page as seen by a new visitor 475 |
Figure 12.3. | Changing the text size using an anonymous profile property 477 |
Figure 12.4. | Adding items anonymously to the shopping cart 479 |
Figure 12.5. | The Login link and User name for a visitor not yet logged in 480 |
Figure 12.6. | Displaying details of an authenticated user 481 |
Figure 12.7. | Shopping anonymously and then logging in 485 |
Figure 12.8. | The migrated text size setting and shopping cart contents 486 |
Figure 12.9. | The structure of a theme in the App_Themes subfolder 490 |
Figure 12.10. | The effects of the Smoke and Glass example theme 493 |
Figure 12.11. | The Shopping Cart page with a theme applied 498 |
Figure 12.12. | The effects of the three themes on the Login page 503 |
Figure 13.1. | Changing the layout in Internet Explorer 6 508 |
Figure 13.2. | The object structure for a WebParts portal page 509 |
Figure 13.3. | Multiple WebPartZones on a page 514 |
Figure 13.4. | Zones shown when designing a page 515 |
Figure 13.5. | Designing with WebParts 517 |
Figure 13.6. | Automatically implementing interfaces 519 |
Figure 13.7. | WebPart chrome and style 522 |
Figure 13.8. | Displaying the Catalog of WebParts 525 |
Figure 13.9. | The Imported WebPart Catalog 526 |
Figure 13.10. | The Editor Zone (without editor parts) 527 |
Figure 13.11. | The Appearance Editor Part 527 |
Figure 13.12. | The Behavior Editor Part 529 |
Figure 13.13. | The Layout Editor Part 531 |
Figure 13.14. | Property Grid for the YahooWeatherWebPart 532 |
Figure 13.15. | WebPart Connections data flow 533 |
Figure 13.16. | Connected WebParts (with no data selected) 538 |
Figure 13.17. | Connected WebParts (with data selected) 539 |
Figure 13.18. | The Connections Zone for a Provider with no active connections 540 |
Figure 13.19. | The Connections Zone for a provider with active connections 541 |
Figure 13.20. | Connections Zone for a Consumer with active connections 543 |
Figure 13.21. | Connecting to a Provider 544 |
Figure 13.22. | Connecting to a Consumer 544 |
Figure 14.1. | Validating HTML content against a legacy schema 549 |
Figure 14.2. | Validating HTML content against the default XHTML Transitional schema 550 |
Figure 14.3. | A warning that the <form> element should not have the name attribute 551 |
Figure 14.4. | An error indicating a missing closing slash in an empty element 551 |
Figure 14.5. | Checking a page for accessibility in Visual Studio 566 |
Figure 14.6. | The results of an accessibility check on a simple page 566 |
Figure 14.7. | Using the alt and longdesc attributes for images 569 |
Figure 14.8. | The contents of the alternative description declared in the longdesc attribute 570 |
Figure 14.9. | An example page that displays a chart viewed in a graphical browser 573 |
Figure 14.10. | The same information viewed as a table in a graphical browser 574 |
Figure 14.11. | The alternative content page viewed in a graphical browser 577 |
Figure 14.12. | The example page skip-to links in a text-only browser 579 |
Figure 14.13. | The table view of the data in a text-only browser 579 |
Figure 14.14. | The alternative content page in a text-only browser 580 |
Figure 14.15. | Demonstrating short-cut keys and GridView accessibility 582 |
Figure 14.16. | Creating a Mobile Device application in Visual Studio 589 |
Figure 14.17. | The application viewed in an HTML device, such as a Pocket PC 597 |
Figure 14.18. | The same page viewed in a mobile phone emulator 598 |
Figure 14.19. | The contents of a culture-neutral resource file 602 |
Figure 14.20. | The result when opening the localized page under the default culture 603 |
Figure 14.21. | The result when opening the localized page under the German culture 604 |
Figure 14.22. | Setting the BackColor property using the Expressions dialog 606 |
Figure 14.23. | The results in the German culture when using an explicit expression 607 |
Figure 14.24. | Localizing static content using local and global resources 610 |
Figure 14.25. | Selecting the US-English culture in the example page 614 |
Figure 14.26. | Selecting the German culture in the example page 614 |
Figure 15.1. | The example application for this chapter 621 |
Figure 15.2. | The second page of the example displays drive and file information using a TreeView control 626 |
Figure 15.3. | The result of creating a collection of values using several of the collection classes with the Framework 633 |
Figure 15.4. | Serializing a HashTable instance and displaying the serialized contents 635 |
Figure 15.5. | The drive, folder, and file listing in the example application 643 |
Figure 15.6. | Specifying GZIP compression for a file 651 |
Figure 15.7. | The result after compression, allowing you to access the new file 651 |
Figure 15.8. | Viewing a file as bytes using the Binary Editor in Visual Studio 652 |
Figure 15.9. | Creating a chart dynamically using the .NET Framework classes 654 |
Figure 15.10. | Retrieving a remote Web page and storing it as a disk file 658 |
Figure 15.11. | A remote retrieved Web page displayed as a stream of bytes 659 |
Figure 15.12. | The result of a DNS lookup for "microsoft.com" 660 |
Figure 15.13. | Sending a collection of values as an e-mail message as well as to a disk file 663 |
Figure 15.14. | A text e-mail sent from an example application 664 |
Figure 15.15. | Selecting the options to send an existing file by e-mail 666 |
Figure 15.16. | Selecting an existing file from disk 667 |
Figure 15.17. | The resulting e-mail with the Web page attached 668 |
Figure 15.18. | Specifying a graphic as the source of the e-mail attachment 668 |
Figure 15.19. | Viewing a graphic delivered in an e-mail message 669 |
Figure 15.20. | A list of users obtained from Active Directory 673 |
Figure 15.21. | Selecting the options to encrypt the source data into a disk file 676 |
Figure 15.22. | Selecting the options to decrypt the file just created 677 |
Figure 15.23. | Viewing the decrypted image file 677 |
Figure 16.1. | The ASP.NET Web Service Help page 686 |
Figure 16.2. | Testing a Web Service method without parameters 687 |
Figure 16.3. | Testing a Web Service method with parameters 689 |
Figure 16.4. | Adding a Web reference 690 |
Figure 16.5. | Naming the Web reference 691 |
Figure 16.6. | WSE Policy configuration 704 |
Figure 16.7. | Selecting the application type and authentication method 705 |
Figure 16.8. | Specifying the message protection 705 |