Acknowledgments |
|
xxv | |
Introduction |
|
xxvii | |
Hardware Requirements |
|
xxviii | |
Software Requirements |
|
xxviii | |
Using the Companion Media |
|
xxviii | |
How to Install the Practice Tests |
|
xxix | |
How to Use the Practice Tests |
|
xxix | |
How to Uninstall the Practice Tests |
|
xxxi | |
Microsoft Certified Professional Program |
|
xxxi | |
Errata and Book Support |
|
xxxi | |
We Want to Hear from You |
|
xxxii | |
Stay in Touch |
|
xxxii | |
|
Chapter 1 Introducing ASP.NET 4 |
|
|
1 | (40) |
|
|
2 | (1) |
|
Lesson 1 Understanding Web Communications |
|
|
3 | (12) |
|
|
4 | (1) |
|
|
5 | (1) |
|
Understanding the Role of HTTP |
|
|
5 | (9) |
|
|
14 | (1) |
|
|
14 | (1) |
|
Lesson 2 Creating a Website and Adding New Webpages |
|
|
15 | (17) |
|
|
15 | (8) |
|
|
23 | (5) |
|
|
28 | (1) |
|
|
29 | (2) |
|
|
31 | (1) |
|
|
31 | (1) |
|
Lesson 3 Working with Web Configuration Files |
|
|
32 | (6) |
|
Understanding the Configuration File Hierarchy |
|
|
33 | (1) |
|
Processing the Configuration Files |
|
|
34 | (1) |
|
Changes to .NET Framework 4 Configuration Files |
|
|
34 | (1) |
|
Editing Configuration Files |
|
|
34 | (4) |
|
|
38 | (1) |
|
|
38 | (1) |
|
|
38 | (1) |
|
Case Scenario 1 Creating a New Website |
|
|
39 | (1) |
|
Case Scenario 2 Placing Files in the Proper Folders |
|
|
39 | (1) |
|
|
39 | (1) |
|
Create a New Website by Using Visual Studio 2010 |
|
|
39 | (1) |
|
Add a Webpage to the Website |
|
|
40 | (1) |
|
Program a Web Application |
|
|
40 | (1) |
|
Examine Settings for a Web Application |
|
|
40 | (1) |
|
|
40 | (1) |
|
Chapter 2 Using Master Pages, Themes, and Caching |
|
|
41 | (56) |
|
|
42 | (1) |
|
Lesson 1 Using Master Pages |
|
|
43 | (17) |
|
Overview of Master and Content Pages |
|
|
44 | (1) |
|
|
45 | (2) |
|
|
47 | (1) |
|
Attaching Master Pages to Content Pages |
|
|
48 | (1) |
|
Referencing Custom Master Page Properties, Methods, and Controls from Content Pages |
|
|
48 | (3) |
|
Creating Nested Master Pages |
|
|
51 | (1) |
|
Dynamically Changing Master Pages |
|
|
52 | (6) |
|
|
58 | (1) |
|
|
59 | (1) |
|
|
60 | (15) |
|
|
60 | (1) |
|
|
61 | (3) |
|
|
64 | (1) |
|
Adding a Cascading Style Sheet to Your Theme |
|
|
65 | (1) |
|
Rules for Applying Themes |
|
|
66 | (1) |
|
Applying a Theme Programmatically |
|
|
67 | (6) |
|
|
73 | (1) |
|
|
74 | (1) |
|
|
75 | (17) |
|
|
75 | (5) |
|
|
80 | (5) |
|
Programmatically Invalidating Cached Pages |
|
|
85 | (6) |
|
|
91 | (1) |
|
|
91 | (1) |
|
|
92 | (2) |
|
Case Scenario 1 Providing Consistent Formatting for an External Web Application |
|
|
92 | (1) |
|
Case Scenario 2 Improving the Performance of a Public Website |
|
|
93 | (1) |
|
|
94 | (1) |
|
Implement Master Pages and Themes |
|
|
94 | (1) |
|
|
95 | (1) |
|
|
95 | (2) |
|
Chapter 3 Handling Events and Managing State |
|
|
97 | (64) |
|
|
98 | (1) |
|
Lesson 1 Understanding the ASP.NET Life Cycle and Handling Events |
|
|
99 | (21) |
|
The ASP.NET Application Life Cycle |
|
|
100 | (3) |
|
Understanding the Life Cycle of an ASP.NET Webpage and Its Controls |
|
|
103 | (16) |
|
|
119 | (1) |
|
|
119 | (1) |
|
Lesson 2 Using Client-Side State Management |
|
|
120 | (23) |
|
Choosing Client-Side or Server-Side State Management |
|
|
121 | (2) |
|
|
123 | (5) |
|
|
128 | (1) |
|
|
129 | (4) |
|
|
133 | (8) |
|
|
141 | (1) |
|
|
142 | (1) |
|
Lesson 3 Using Server-Side State Management |
|
|
143 | (12) |
|
|
144 | (1) |
|
|
145 | (9) |
|
|
154 | (1) |
|
|
154 | (1) |
|
|
155 | (2) |
|
Case Scenario 1 Selecting the Proper Events to Use |
|
|
155 | (1) |
|
Case Scenario 2 Remembering User Credentials |
|
|
156 | (1) |
|
Case Scenario 3 Analyzing Information for Individual Users and for All Users |
|
|
156 | (1) |
|
|
157 | (2) |
|
Respond to Application and Session Events |
|
|
157 | (1) |
|
Create Event Handlers for Pages and Controls |
|
|
157 | (1) |
|
Manage State by Using Client-Based State Management Options |
|
|
158 | (1) |
|
Manage State by Using Server-Based State Management Options |
|
|
158 | (1) |
|
Maintain State by Using Database Technology |
|
|
158 | (1) |
|
|
159 | (2) |
|
Chapter 4 Using Server Controls |
|
|
161 | (66) |
|
|
162 | (1) |
|
Lesson 1 Exploring Common Server Controls |
|
|
163 | (23) |
|
|
163 | (4) |
|
|
167 | (2) |
|
|
169 | (2) |
|
|
171 | (1) |
|
|
172 | (1) |
|
|
172 | (1) |
|
|
173 | (2) |
|
|
175 | (1) |
|
|
175 | (2) |
|
|
177 | (7) |
|
|
184 | (1) |
|
|
185 | (1) |
|
Lesson 2 Exploring Specialized Server Controls |
|
|
186 | (38) |
|
The Table, TableRow, and TableCell Controls |
|
|
187 | (2) |
|
|
189 | (2) |
|
|
191 | (1) |
|
|
192 | (5) |
|
|
197 | (5) |
|
|
202 | (3) |
|
|
205 | (2) |
|
The MultiView and View Controls |
|
|
207 | (3) |
|
|
210 | (4) |
|
|
214 | (9) |
|
|
223 | (1) |
|
|
223 | (1) |
|
|
224 | (2) |
|
Case Scenario 1 Determining the Type of Controls to Use |
|
|
225 | (1) |
|
Case Scenario 2 Determining How to Prompt for Data |
|
|
225 | (1) |
|
Case Scenario 3 Implementing a Calendar Solution |
|
|
225 | (1) |
|
|
226 | (1) |
|
Implement Server Controls |
|
|
226 | (1) |
|
|
226 | (1) |
|
Chapter 5 Input Validation and Site Navigation |
|
|
227 | (64) |
|
|
228 | (1) |
|
Lesson 1 Performing Input Validation |
|
|
228 | (17) |
|
Understanding the Validation Framework |
|
|
229 | (3) |
|
Understanding the RequiredFieldValidator Control |
|
|
232 | (1) |
|
Using the CompareValidator Control |
|
|
232 | (2) |
|
Using the RangeValidator Control |
|
|
234 | (1) |
|
Using the RegularExpressionValidator Control |
|
|
234 | (1) |
|
The CustomValidator Control |
|
|
235 | (9) |
|
|
244 | (1) |
|
|
244 | (1) |
|
Lesson 2 Performing Site Navigation |
|
|
245 | (15) |
|
Is Page Navigation Necessary? |
|
|
246 | (1) |
|
Choosing a Method to Navigate Pages |
|
|
246 | (1) |
|
|
247 | (1) |
|
|
248 | (2) |
|
Client-Side Browser Redirect |
|
|
250 | (1) |
|
|
251 | (1) |
|
Using the Site Map Web Server Control |
|
|
252 | (7) |
|
|
259 | (1) |
|
|
259 | (1) |
|
|
260 | (27) |
|
|
261 | (2) |
|
|
263 | (1) |
|
|
264 | (1) |
|
|
265 | (1) |
|
Enabling Users to Arrange and Edit Web Parts |
|
|
266 | (3) |
|
|
269 | (5) |
|
|
274 | (12) |
|
|
286 | (1) |
|
|
286 | (1) |
|
|
287 | (2) |
|
Case Scenario 1 Determining the Proper Validation Controls to Implement on a User Name |
|
|
288 | (1) |
|
Case Scenario 2 Implementing a Site Map |
|
|
288 | (1) |
|
Case Scenario 3 Meeting Customization Requirements for an Internal Insurance Application |
|
|
288 | (1) |
|
|
289 | (1) |
|
|
289 | (1) |
|
|
290 | (1) |
|
|
290 | (1) |
|
Chapter 6 Globalization and Accessibility |
|
|
291 | (38) |
|
|
292 | (1) |
|
Lesson 1 Configuring Globalization and Localization |
|
|
292 | (20) |
|
|
293 | (1) |
|
Using Local Resource Files |
|
|
293 | (7) |
|
|
300 | (4) |
|
HTML Layout Best Practices |
|
|
304 | (1) |
|
|
305 | (6) |
|
|
311 | (1) |
|
|
311 | (1) |
|
Lesson 2 Configuring Accessibility |
|
|
312 | (13) |
|
Public Accessibility Guidelines |
|
|
313 | (1) |
|
How ASP.NET Controls Support Accessibility |
|
|
313 | (1) |
|
Improving Visual Accessibility |
|
|
314 | (2) |
|
Improving the Accessibility of Forms That Require User Input |
|
|
316 | (2) |
|
|
318 | (6) |
|
|
324 | (1) |
|
|
324 | (1) |
|
|
325 | (1) |
|
Case Scenario 1 Upgrading an Application for Multiple Languages |
|
|
325 | (1) |
|
Case Scenario 2 Making a Web Application Accessible |
|
|
326 | (1) |
|
|
326 | (1) |
|
|
326 | (1) |
|
|
327 | (1) |
|
|
327 | (2) |
|
Chapter 7 Creating Custom Web Controls |
|
|
329 | (58) |
|
|
330 | (1) |
|
Lesson 1 Creating User Controls |
|
|
331 | (24) |
|
|
331 | (2) |
|
Defining User Control Events |
|
|
333 | (4) |
|
Defining Properties in User Controls |
|
|
337 | (2) |
|
Adding a User Control to a Page |
|
|
339 | (1) |
|
Dynamically Loading User Controls |
|
|
339 | (1) |
|
Creating a Templated User Control |
|
|
340 | (13) |
|
|
353 | (1) |
|
|
353 | (2) |
|
Lesson 2 Creating Custom Web Server Controls |
|
|
355 | (15) |
|
Creating a Custom Web Server Control |
|
|
356 | (8) |
|
Adding Toolbox Support for a Custom Web Server Control |
|
|
364 | (6) |
|
Creating a Custom Designer for a Custom Web Server Control |
|
|
370 | (14) |
|
Creating a Composite Control |
|
|
372 | (5) |
|
Creating a Templated Custom Web Server Control |
|
|
377 | (1) |
|
Registering Your Controls in Web.config |
|
|
378 | (5) |
|
|
383 | (1) |
|
|
383 | (1) |
|
|
384 | (1) |
|
Case Scenario 1 Sharing Controls Between Applications |
|
|
385 | (1) |
|
Case Scenario 2 Providing Layout Flexibility |
|
|
385 | (1) |
|
|
385 | (1) |
|
Create a New User Control |
|
|
385 | (1) |
|
Create a New Custom Web Server Control |
|
|
386 | (1) |
|
Create a New Composite Web Server Control |
|
|
386 | (1) |
|
Create a New Templated Control |
|
|
386 | (1) |
|
|
386 | (1) |
|
Chapter 8 Debugging and Deploying |
|
|
387 | (66) |
|
|
388 | (1) |
|
Lesson 1 Debugging Websites |
|
|
389 | (13) |
|
Configuring ASP.NET for Debugging |
|
|
389 | (3) |
|
Defining Custom Error Pages |
|
|
392 | (2) |
|
|
394 | (2) |
|
Debugging Client-Side Script |
|
|
396 | (4) |
|
|
400 | (1) |
|
|
401 | (1) |
|
Lesson 2 Troubleshooting Websites |
|
|
402 | (16) |
|
|
402 | (10) |
|
Monitoring a Running Web Application |
|
|
412 | (4) |
|
|
416 | (1) |
|
|
416 | (2) |
|
Lesson 3 Deploying Websites |
|
|
418 | (30) |
|
Publishing Web Applications |
|
|
419 | (6) |
|
|
425 | (2) |
|
|
427 | (12) |
|
Deploying Web Applications by Using the Copy Web Tool |
|
|
439 | (2) |
|
Precompiling and Publishing ASP.NET Websites |
|
|
441 | (1) |
|
Installing ASP.NET 4 on IIS |
|
|
442 | (4) |
|
|
446 | (1) |
|
|
447 | (1) |
|
|
448 | (1) |
|
Case Scenario 1 Debugging |
|
|
448 | (1) |
|
Case Scenario 2 Troubleshooting |
|
|
448 | (1) |
|
Case Scenario 3 Deploying a Website |
|
|
449 | (1) |
|
|
449 | (2) |
|
|
449 | (1) |
|
|
450 | (1) |
|
Publish a Web Application |
|
|
450 | (1) |
|
|
450 | (1) |
|
|
451 | (1) |
|
Precompile and Publish a Web Application |
|
|
451 | (1) |
|
|
451 | (2) |
|
Chapter 9 Working with Client-Side Scripting, AJAX, and jQuery |
|
|
453 | (98) |
|
|
454 | (1) |
|
Lesson 1 Creating AJAX-Enabled Web Forms |
|
|
455 | (16) |
|
|
456 | (1) |
|
|
457 | (12) |
|
|
469 | (1) |
|
|
470 | (1) |
|
Lesson 2 Creating Client Scripts with the Microsoft AJAX Library |
|
|
471 | (49) |
|
Creating Your Own Client Scripts |
|
|
472 | (8) |
|
Creating Your Own Client Callbacks |
|
|
480 | (3) |
|
Working with the Microsoft AJAX Library |
|
|
483 | (11) |
|
Building Client Capabilities with AJAX |
|
|
494 | (24) |
|
|
518 | (1) |
|
|
518 | (2) |
|
Lesson 3 Implementing jQuery |
|
|
520 | (27) |
|
Introducing the jQuery Library |
|
|
521 | (3) |
|
Selecting and Traversing the DOM |
|
|
524 | (6) |
|
Handling Client-Side Events |
|
|
530 | (3) |
|
Adding Effects and Animations to a Page |
|
|
533 | (1) |
|
Implementing AJAX with jQuery |
|
|
534 | (11) |
|
|
545 | (1) |
|
|
546 | (1) |
|
|
547 | (2) |
|
Case Scenario 1 Using the ASP.NET AJAX Extensions |
|
|
548 | (1) |
|
Case Scenario 2 Using the Microsoft AJAX Library |
|
|
548 | (1) |
|
Case Scenario 3 Using jQuery |
|
|
549 | (1) |
|
|
549 | (1) |
|
Add Partial-Page Update Support to a Page |
|
|
549 | (1) |
|
Create Client Code by Using the Microsoft AJAX Library |
|
|
550 | (1) |
|
Write Interactive Client Code with jQuery |
|
|
550 | (1) |
|
|
550 | (1) |
|
Chapter 10 Writing and Working with HTTP Modules and Web Services |
|
|
551 | (72) |
|
|
552 | (1) |
|
Lesson 1 Creating HTTP Handlers and HTTP Modules |
|
|
552 | (22) |
|
Creating a Custom HTTP Handler |
|
|
553 | (5) |
|
Asynchronous Handlers and Pages |
|
|
558 | (8) |
|
Creating a Custom HTTP Module |
|
|
566 | (7) |
|
|
573 | (1) |
|
|
574 | (1) |
|
Lesson 2 Creating and Consuming XML Web Services |
|
|
574 | (19) |
|
Creating an ASP.NET Web Service |
|
|
576 | (4) |
|
Consuming an ASP.NET Web Service |
|
|
580 | (6) |
|
Authentication and XML Web Services |
|
|
586 | (5) |
|
|
591 | (1) |
|
|
592 | (1) |
|
Lesson 3 Creating and Consuming WCF Services |
|
|
593 | (27) |
|
|
594 | (2) |
|
Creating a WCF Service with ASP.NET |
|
|
596 | (4) |
|
Consuming a WCF Service in an ASP.NET Page |
|
|
600 | (3) |
|
Calling a WCF Service from Client Script by Using AJAX (REST and JSON) |
|
|
603 | (4) |
|
Creating WCF Data Services |
|
|
607 | (12) |
|
|
619 | (1) |
|
|
619 | (1) |
|
|
620 | (1) |
|
Case Scenario 1 Working with HTTP Requests |
|
|
620 | (1) |
|
Case Scenario 2 Selecting a Service Model |
|
|
621 | (1) |
|
|
621 | (1) |
|
Work with XML HTTP Handlers and Modules |
|
|
621 | (1) |
|
Work with XML Web Services |
|
|
622 | (1) |
|
|
622 | (1) |
|
|
622 | (1) |
|
Chapter 11 Connecting to and Querying Data with LINQ |
|
|
623 | (62) |
|
|
624 | (1) |
|
Lesson 1 Getting Started with LINQ |
|
|
625 | (22) |
|
|
625 | (3) |
|
|
628 | (9) |
|
Transforming Data with LINQ |
|
|
637 | (10) |
|
|
647 | (1) |
|
|
647 | (2) |
|
Lesson 2 LINQ and ADO.NET |
|
|
649 | (33) |
|
|
649 | (15) |
|
|
664 | (8) |
|
|
672 | (8) |
|
|
680 | (1) |
|
|
681 | (1) |
|
|
682 | (1) |
|
Case Scenario 1 Writing LINQ Queries |
|
|
682 | (1) |
|
Case Scenario 2 Working with LINQ and ADO.NET |
|
|
682 | (1) |
|
|
683 | (1) |
|
|
683 | (1) |
|
Work with LINQ and ADO.NET |
|
|
683 | (1) |
|
|
684 | (1) |
|
Chapter 12 Working with Data Source Controls and Data-Bound Controls |
|
|
685 | (102) |
|
|
686 | (1) |
|
Lesson 1 Connecting to Data with Data Source Controls |
|
|
687 | (34) |
|
Understanding the Data Source Controls |
|
|
687 | (3) |
|
Using Objects as Data Sources with ObjectDataSource |
|
|
690 | (8) |
|
Connecting to Relational Databases by Using SqlDataSource |
|
|
698 | (4) |
|
Working with Access Data Files and AccessDataSource Controls |
|
|
702 | (1) |
|
Connecting to an Entity Model by Using EntityDataSource |
|
|
703 | (4) |
|
Connecting to XML Data by Using XmlDataSource |
|
|
707 | (4) |
|
Connecting to LINQ-Based Data by Using LinqDataSource |
|
|
711 | (1) |
|
Connecting to Site Navigation Data by Using SiteMapDataSource |
|
|
712 | (7) |
|
|
719 | (1) |
|
|
720 | (1) |
|
Lesson 2 Working with Data-Bound Web Server Controls |
|
|
721 | (34) |
|
Introducing Data-Bound Controls |
|
|
721 | (3) |
|
Simple Data-Bound Controls |
|
|
724 | (4) |
|
Composite Data-Bound Controls |
|
|
728 | (13) |
|
Hierarchical Data-Bound Controls |
|
|
741 | (12) |
|
|
753 | (1) |
|
|
754 | (1) |
|
Lesson 3 Working with ASP.NET Dynamic Data |
|
|
755 | (28) |
|
Getting Started with Dynamic Data Websites |
|
|
756 | (7) |
|
Extending and Customizing Dynamic Data |
|
|
763 | (14) |
|
Using Dynamic Controls in Existing Sites |
|
|
777 | (4) |
|
|
781 | (1) |
|
|
782 | (1) |
|
|
783 | (1) |
|
Case Scenario 1 Choosing Data Source Controls |
|
|
783 | (1) |
|
Case Scenario 2 Implementing a Master-Detail Solution |
|
|
783 | (1) |
|
Case Scenario 3 Adding ASP.NET Dynamic Data to a Website |
|
|
784 | (1) |
|
|
784 | (1) |
|
Create Pages by Using Each of the Controls |
|
|
784 | (1) |
|
Create a Master-Detail Solution by Using the Data-Bound Server Controls |
|
|
784 | (1) |
|
Work with Dynamic Data Websites |
|
|
785 | (1) |
|
|
785 | (2) |
|
Chapter 13 Implementing User Profiles, Authentication, and Authorization |
|
|
787 | (44) |
|
|
788 | (1) |
|
Lesson 1 Working with User Profiles |
|
|
788 | (16) |
|
|
789 | (1) |
|
Configuring a User Profile Provider |
|
|
790 | (2) |
|
Defining the User Profile |
|
|
792 | (2) |
|
|
794 | (2) |
|
Setting and Saving a User Profile |
|
|
796 | (1) |
|
Recognizing a Returning Visitor |
|
|
797 | (5) |
|
|
802 | (1) |
|
|
802 | (2) |
|
Lesson 2 Using ASP.NET Membership |
|
|
804 | (23) |
|
Using the WSAT to Configure Security |
|
|
804 | (3) |
|
|
807 | (6) |
|
The FormsAuthentication Class |
|
|
813 | (2) |
|
|
815 | (1) |
|
|
816 | (1) |
|
Configuring Websites to Require Windows Authentication |
|
|
817 | (1) |
|
Restricting Access to ASP.NET Websites, Files, and Folders |
|
|
818 | (6) |
|
|
824 | (1) |
|
|
824 | (3) |
|
|
827 | (2) |
|
Case Scenario 1 Configuring Website Authorization |
|
|
827 | (1) |
|
Case Scenario 2 Configuring Website Authentication |
|
|
828 | (1) |
|
|
829 | (1) |
|
Configure Authentication and Authorization |
|
|
829 | (1) |
|
|
830 | (1) |
|
|
830 | (1) |
|
Chapter 14 Creating Websites with ASP.NET MVC 2 |
|
|
831 | (50) |
|
|
832 | (1) |
|
Lesson 1 Understanding ASP.NET MVC Applications |
|
|
832 | (15) |
|
The ASP.NET MVC Architecture |
|
|
833 | (4) |
|
The Structure of an ASP.NET MVC Application |
|
|
837 | (2) |
|
Running Your First ASP.NET MVC Webpage |
|
|
839 | (6) |
|
|
845 | (1) |
|
|
846 | (1) |
|
Lesson 2 Creating Models, Views, and Controllers |
|
|
847 | (31) |
|
Defining a Model and Business Rules |
|
|
848 | (3) |
|
|
851 | (5) |
|
|
856 | (11) |
|
|
867 | (8) |
|
|
875 | (1) |
|
|
876 | (2) |
|
|
878 | (1) |
|
Case Scenario: Creating an ASP.NET MVC Application |
|
|
878 | (1) |
|
|
878 | (1) |
|
Work with Controllers, Views, and Routing |
|
|
879 | (1) |
|
|
879 | (2) |
Answers |
|
881 | (44) |
Index |
|
925 | (42) |
About the Authors |
|
967 | |