Acknowledgments |
|
ix | |
Introduction |
|
xxiii | |
|
An Introduction to ASP.NET 2.0 and the Wrox United Application |
|
|
1 | (26) |
|
|
3 | (1) |
|
ASP.NET 2.0---A Powerful Tool to Build Dynamic Web Sites |
|
|
4 | (1) |
|
Simple Solutions for Common Web Site Tasks |
|
|
5 | (2) |
|
Consistency and Personalization |
|
|
5 | (1) |
|
|
5 | (1) |
|
Login, Security, and Roles |
|
|
5 | (1) |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
6 | (1) |
|
Errors and Exception Handling |
|
|
7 | (1) |
|
|
7 | (1) |
|
|
7 | (1) |
|
Where Does ASP.NET 2.0 Fit with Other Technology? |
|
|
7 | (1) |
|
Exploring the Wrox United Application |
|
|
8 | (2) |
|
Getting Started with Your Wrox United Site |
|
|
10 | (1) |
|
VWD Express---A Development Environment |
|
|
10 | (15) |
|
Introducing the ASP.NET Development Server |
|
|
11 | (1) |
|
|
11 | (2) |
|
Creating, Opening, and Using Web Sites and Pages with VWD |
|
|
13 | (1) |
|
The Sample Code (Download) Directories |
|
|
14 | (1) |
|
|
15 | (1) |
|
|
16 | (2) |
|
|
18 | (2) |
|
|
20 | (2) |
|
|
22 | (2) |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
25 | (2) |
|
|
27 | (28) |
|
General Design Objectives |
|
|
28 | (1) |
|
|
29 | (10) |
|
|
29 | (2) |
|
|
31 | (2) |
|
A Sample of Master and Content Pages |
|
|
33 | (1) |
|
Using Cascading Style Sheets in Master Page |
|
|
34 | (5) |
|
Additional Capabilities of Master Pages |
|
|
39 | (3) |
|
Multiple Levels of Master Pages |
|
|
39 | (2) |
|
Master Pages Support Multiple Content Placeholders |
|
|
41 | (1) |
|
|
42 | (3) |
|
General Guidelines for Site Design |
|
|
45 | (1) |
|
Standard Files for ASP.NET 2.0 Applications |
|
|
45 | (8) |
|
Web.config Holds Settings for the Entire Site |
|
|
45 | (5) |
|
Global.asax Holds Code for the Entire Site |
|
|
50 | (1) |
|
Editing Site Configuration Through a Web Browser |
|
|
50 | (3) |
|
Troubleshooting Site Design Errors |
|
|
53 | (1) |
|
|
53 | (1) |
|
|
54 | (1) |
|
|
55 | (46) |
|
|
55 | (7) |
|
|
62 | (6) |
|
|
66 | (2) |
|
|
68 | (1) |
|
Dynamic Client Code and Dynamic Server Code |
|
|
69 | (1) |
|
Introduction to Server Controls |
|
|
69 | (11) |
|
The Server Control Toolbox |
|
|
70 | (1) |
|
What Are Server Controls? |
|
|
71 | (4) |
|
|
75 | (5) |
|
|
80 | (17) |
|
|
80 | (2) |
|
|
82 | (1) |
|
|
83 | (14) |
|
|
97 | (1) |
|
|
98 | (3) |
|
|
101 | (32) |
|
|
102 | (1) |
|
|
102 | (1) |
|
Authentication---This Is Who I Am |
|
|
102 | (1) |
|
Authorization---This Is What I Can Do |
|
|
102 | (1) |
|
|
103 | (1) |
|
|
103 | (25) |
|
|
103 | (14) |
|
|
117 | (3) |
|
|
120 | (5) |
|
|
125 | (3) |
|
|
128 | (3) |
|
|
131 | (1) |
|
|
132 | (1) |
|
|
133 | (42) |
|
|
133 | (34) |
|
|
134 | (4) |
|
CSS---Cascading Style Sheets |
|
|
138 | (9) |
|
|
147 | (18) |
|
Applying Styling to a Site |
|
|
165 | (2) |
|
|
167 | (5) |
|
Styling and Layout Best Practices |
|
|
172 | (1) |
|
|
172 | (1) |
|
|
172 | (1) |
|
|
173 | (1) |
|
|
174 | (1) |
|
|
175 | (28) |
|
|
175 | (2) |
|
|
176 | (1) |
|
|
177 | (1) |
|
Adding Events to the Page |
|
|
178 | (11) |
|
The Postback Architecture |
|
|
184 | (2) |
|
What Events Are Available? |
|
|
186 | (1) |
|
Which Events Should I Use? |
|
|
186 | (3) |
|
Events Aren't Triggered by Users Only |
|
|
189 | (4) |
|
|
193 | (3) |
|
|
196 | (4) |
|
|
200 | (1) |
|
|
201 | (1) |
|
|
202 | (1) |
|
|
203 | (58) |
|
|
203 | (2) |
|
Using ASP.NET 2.0's Data Controls |
|
|
205 | (7) |
|
Introducing Data Source Controls |
|
|
205 | (1) |
|
Introducing Data-Bound Controls |
|
|
206 | (5) |
|
Data Source Controls and Data-Bound Controls Work Together |
|
|
211 | (1) |
|
Configuring Data Controls with VWD |
|
|
211 | (1) |
|
|
212 | (6) |
|
The Basic Properties of Data Source Controls |
|
|
212 | (3) |
|
Hiding the Connection String |
|
|
215 | (2) |
|
Details of the Connection String and Provider |
|
|
217 | (1) |
|
|
218 | (24) |
|
Data-Bound Selection Lists |
|
|
218 | (7) |
|
|
225 | (6) |
|
The DataList and Repeater Controls |
|
|
231 | (8) |
|
The DetailsView and FormView Controls |
|
|
239 | (3) |
|
Data Source Controls with Parameters |
|
|
242 | (5) |
|
Multiple Data Controls Working Together |
|
|
247 | (6) |
|
|
253 | (5) |
|
|
255 | (3) |
|
|
258 | (1) |
|
|
259 | (1) |
|
|
260 | (1) |
|
|
261 | (24) |
|
Introduction to Writing Data |
|
|
261 | (2) |
|
|
262 | (1) |
|
|
262 | (1) |
|
Changing Existing Records |
|
|
263 | (6) |
|
|
269 | (2) |
|
|
271 | (3) |
|
|
274 | (4) |
|
Improving the Upload of Pictures |
|
|
278 | (5) |
|
|
283 | (1) |
|
|
284 | (1) |
|
|
285 | (62) |
|
|
285 | (21) |
|
Common Language Runtime Types |
|
|
287 | (1) |
|
What Are All Those Curly Brackets and Semicolons For? |
|
|
288 | (1) |
|
|
288 | (1) |
|
|
289 | (1) |
|
|
289 | (2) |
|
|
291 | (1) |
|
|
291 | (3) |
|
|
294 | (3) |
|
Working with Arrays and Collections |
|
|
297 | (6) |
|
Deciding Whether to Use Arrays or Collections |
|
|
303 | (1) |
|
|
304 | (1) |
|
|
305 | (1) |
|
|
306 | (20) |
|
|
306 | (6) |
|
|
312 | (4) |
|
|
316 | (10) |
|
|
326 | (1) |
|
|
327 | (16) |
|
|
328 | (10) |
|
|
338 | (5) |
|
Variable Scope and Lifetime |
|
|
343 | (2) |
|
|
345 | (1) |
|
|
346 | (1) |
|
|
346 | (1) |
|
|
347 | (36) |
|
The Separation of Code from Content |
|
|
348 | (1) |
|
The Separation of Code from Design |
|
|
349 | (1) |
|
|
350 | (2) |
|
|
350 | (1) |
|
|
351 | (1) |
|
|
351 | (1) |
|
Creating a Code-Behind File |
|
|
352 | (5) |
|
Compilation in ASP.NET 2.0 |
|
|
356 | (1) |
|
|
357 | (1) |
|
|
357 | (10) |
|
|
357 | (1) |
|
|
358 | (1) |
|
What's New in ASP.NET 2.0 |
|
|
359 | (5) |
|
The Wrox United Object Data Source |
|
|
364 | (3) |
|
|
367 | (12) |
|
|
369 | (1) |
|
|
370 | (5) |
|
The Wrox United News User Control |
|
|
375 | (4) |
|
|
379 | (1) |
|
Assemblies and Custom Server Controls |
|
|
379 | (1) |
|
|
380 | (1) |
|
|
381 | (2) |
|
|
383 | (42) |
|
|
384 | (1) |
|
Introducing Roles in Wrox United |
|
|
385 | (11) |
|
Configuring Page-Level Authorization |
|
|
396 | (8) |
|
Controlling Page Visibility |
|
|
397 | (7) |
|
Working with Roles in Code |
|
|
404 | (1) |
|
|
405 | (1) |
|
|
406 | (16) |
|
|
408 | (8) |
|
|
416 | (6) |
|
Managing Anonymous Shopping Carts |
|
|
422 | (1) |
|
|
423 | (1) |
|
|
423 | (2) |
|
|
425 | (36) |
|
|
426 | (4) |
|
Consuming a Third-Party Web Service |
|
|
427 | (3) |
|
The Life Cycle of a Web Service |
|
|
430 | (5) |
|
|
431 | (1) |
|
Transmitting the Web Service |
|
|
431 | (2) |
|
|
433 | (2) |
|
|
435 | (1) |
|
The Structure of Your Web Service |
|
|
435 | (3) |
|
|
435 | (1) |
|
|
436 | (1) |
|
|
436 | (1) |
|
|
436 | (2) |
|
|
438 | (3) |
|
|
441 | (3) |
|
|
443 | (1) |
|
|
444 | (3) |
|
|
445 | (1) |
|
|
445 | (1) |
|
Discovering Your Web Service |
|
|
445 | (2) |
|
Adding the Fixture Service to Your Application |
|
|
447 | (3) |
|
|
450 | (5) |
|
Remote Web Services --- PocketPC Application |
|
|
455 | (4) |
|
|
459 | (1) |
|
Encryption and Message-Based Security |
|
|
459 | (1) |
|
Authentication and Access Controls for Services |
|
|
459 | (1) |
|
|
460 | (1) |
|
|
460 | (1) |
|
|
461 | (62) |
|
|
462 | (1) |
|
|
463 | (14) |
|
The Structure of the Catalog |
|
|
463 | (1) |
|
The Design of the Catalog |
|
|
463 | (1) |
|
Implementation of the Catalog |
|
|
464 | (7) |
|
|
471 | (6) |
|
|
477 | (25) |
|
|
477 | (10) |
|
|
487 | (2) |
|
The Shopping Cart Control |
|
|
489 | (13) |
|
|
502 | (18) |
|
|
503 | (1) |
|
|
503 | (1) |
|
|
503 | (1) |
|
|
504 | (1) |
|
How You Intend to Checkout |
|
|
505 | (15) |
|
|
520 | (1) |
|
|
520 | (1) |
|
|
521 | (1) |
|
|
521 | (2) |
|
|
523 | (32) |
|
|
523 | (16) |
|
|
524 | (3) |
|
|
527 | (1) |
|
|
527 | (9) |
|
Strongly Typed Collections |
|
|
536 | (1) |
|
|
537 | (1) |
|
|
538 | (1) |
|
|
539 | (4) |
|
Data Binding and Postback |
|
|
539 | (1) |
|
|
540 | (1) |
|
StringBuilder Versus String Concatenation |
|
|
540 | (2) |
|
Picking the Right Collection |
|
|
542 | (1) |
|
|
543 | (5) |
|
|
543 | (5) |
|
Designing for Performance |
|
|
548 | (1) |
|
Web Server Hardware and Software |
|
|
549 | (1) |
|
|
549 | (4) |
|
|
549 | (3) |
|
|
552 | (1) |
|
|
552 | (1) |
|
|
553 | (1) |
|
|
553 | (2) |
|
|
555 | (42) |
|
|
555 | (9) |
|
|
556 | (1) |
|
|
557 | (1) |
|
|
558 | (1) |
|
|
559 | (5) |
|
|
564 | (15) |
|
|
565 | (1) |
|
|
565 | (1) |
|
|
566 | (7) |
|
|
573 | (3) |
|
|
576 | (2) |
|
|
578 | (1) |
|
Exceptions Best Practices |
|
|
579 | (1) |
|
Global Exception Handling |
|
|
579 | (2) |
|
|
581 | (2) |
|
Configuring Custom Error Pages |
|
|
582 | (1) |
|
|
583 | (12) |
|
|
584 | (4) |
|
|
588 | (7) |
|
|
595 | (1) |
|
|
596 | (1) |
|
Deployment, Builds, and Finishing Up |
|
|
597 | (24) |
|
|
598 | (11) |
|
|
598 | (1) |
|
Compiling and Running Your Application |
|
|
599 | (1) |
|
|
600 | (3) |
|
|
603 | (2) |
|
Common Problems Encountered When Deploying a Site |
|
|
605 | (4) |
|
|
609 | (8) |
|
|
609 | (1) |
|
|
610 | (7) |
|
|
617 | (1) |
|
|
618 | (1) |
|
|
618 | (1) |
|
|
619 | (2) |
|
Appendix A: Exercise Answers |
|
|
621 | (26) |
|
|
647 | (18) |
|
|
647 | (1) |
|
|
647 | (1) |
|
|
648 | (1) |
|
|
648 | (1) |
|
|
648 | (1) |
|
|
648 | (1) |
|
|
648 | (1) |
|
|
648 | (1) |
|
Visual Web Developer Express Installation |
|
|
648 | (6) |
|
|
654 | (4) |
|
|
654 | (4) |
|
|
658 | (5) |
|
|
659 | (2) |
|
Windows XP Home Edition Users Only |
|
|
661 | (1) |
|
Checking the Installation with VWD and the ASP.NET Development Server |
|
|
661 | (1) |
|
Checking the Installation with IIS |
|
|
662 | (1) |
|
|
663 | (2) |
|
Appendix C: Wrox United Database Design |
|
|
665 | (8) |
|
|
666 | (3) |
|
|
666 | (1) |
|
|
667 | (1) |
|
|
668 | (1) |
|
|
669 | (1) |
|
|
669 | (1) |
|
|
669 | (1) |
|
|
669 | (1) |
|
|
670 | (1) |
|
|
670 | (3) |
|
|
670 | (1) |
|
|
671 | (1) |
|
|
672 | (1) |
|
Appendix D: VWD Database Explorer |
|
|
673 | (18) |
|
Opening the Database Explorer |
|
|
673 | (1) |
|
Adding an Existing Database to the Database Explorer |
|
|
673 | (4) |
|
|
674 | (1) |
|
SQL Databases on a SQL Server (Including SQL Server Express) |
|
|
675 | (1) |
|
Saving SQL Databases as an MDF.File |
|
|
676 | (1) |
|
Viewing Database Diagrams |
|
|
677 | (4) |
|
Exploring a Table's Structure |
|
|
681 | (1) |
|
Observing and Editing Data of Existing Tables |
|
|
682 | (1) |
|
|
683 | (1) |
|
Creating a New Table and Adding Data |
|
|
683 | (1) |
|
Examining and Creating Views |
|
|
684 | (5) |
|
Examining a Stored Procedure (SPROC) |
|
|
689 | (1) |
|
|
690 | (1) |
|
Appendix E: CSS and HTML Quick Reference |
|
|
691 | (22) |
|
Styling Pages and Controls |
|
|
691 | (8) |
|
|
692 | (1) |
|
Linking Style Sheets to a Page |
|
|
693 | (1) |
|
|
693 | (1) |
|
|
693 | (2) |
|
|
695 | (1) |
|
|
695 | (1) |
|
|
696 | (1) |
|
|
696 | (2) |
|
|
698 | (1) |
|
|
699 | (1) |
|
|
699 | (5) |
|
Common HTML Tags by Category |
|
|
704 | (5) |
|
|
704 | (1) |
|
|
705 | (1) |
|
|
705 | (1) |
|
|
706 | (1) |
|
|
707 | (1) |
|
|
707 | (1) |
|
|
707 | (1) |
|
Graphics, Objects, Multimedia, and Scripts |
|
|
708 | (1) |
|
|
708 | (1) |
|
|
709 | (1) |
|
HTML Common Attributes to the CSS Property |
|
|
709 | (2) |
|
|
711 | (2) |
Index |
|
713 | |