Figures |
|
xvii | |
Tables |
|
xxiii | |
Foreword |
|
xxix | |
Preface |
|
xxxiii | |
|
1 An Introduction to ASP.NET 2.0 |
|
|
1 | (26) |
|
What's Wrong with ASP.NET 1.x? |
|
|
1 | (2) |
|
|
3 | (21) |
|
Templates for a Consistent Look and Feel |
|
|
3 | (2) |
|
|
5 | (2) |
|
|
7 | (2) |
|
|
9 | (2) |
|
|
11 | (5) |
|
Setting Up and Managing Your Site |
|
|
16 | (2) |
|
Using Images on Your Site |
|
|
18 | (1) |
|
|
19 | (2) |
|
|
21 | (1) |
|
|
22 | (2) |
|
Compilation and Deployment |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
26 | (1) |
|
|
27 | (26) |
|
|
28 | (12) |
|
|
30 | (2) |
|
|
32 | (1) |
|
|
32 | (1) |
|
|
32 | (2) |
|
|
34 | (1) |
|
|
35 | (3) |
|
|
38 | (1) |
|
|
39 | (1) |
|
|
40 | (2) |
|
|
42 | (6) |
|
New Folders for Dynamic Compilation |
|
|
42 | (1) |
|
Using the \Code Folder in Visual Studio 2005 |
|
|
43 | (1) |
|
|
44 | (4) |
|
Pre-compilation of Applications |
|
|
48 | (4) |
|
|
48 | (2) |
|
Pre-compilation for Deployment without Source |
|
|
50 | (1) |
|
Pre-compilation for Deployment with Source |
|
|
51 | (1) |
|
|
51 | (1) |
|
|
52 | (1) |
|
3 Data Source Controls and Data Binding |
|
|
53 | (52) |
|
|
54 | (10) |
|
Displaying Data with a Data Source Control |
|
|
54 | (2) |
|
Adding Row Sorting Capabilities |
|
|
56 | (1) |
|
Adding Row Paging Capabilities |
|
|
56 | (1) |
|
Built-in Small-Screen and Mobile Device Support |
|
|
57 | (2) |
|
Linking Page Controls and Data Source Control Parameters |
|
|
59 | (2) |
|
Editing Data with a GridView and a Data Source Control |
|
|
61 | (2) |
|
|
63 | (1) |
|
|
64 | (38) |
|
Types of Data Source Controls |
|
|
65 | (1) |
|
The SqlDataSource Control |
|
|
66 | (18) |
|
The AccessDataSource Control |
|
|
84 | (2) |
|
The Base Classes for the Data Source Controls |
|
|
86 | (1) |
|
The XmlDataSource Control |
|
|
87 | (5) |
|
The DataSetDataSource Control |
|
|
92 | (2) |
|
The ObjectDataSource Control |
|
|
94 | (8) |
|
Possible Forthcoming Data Source Controls |
|
|
102 | (1) |
|
|
102 | (3) |
|
4 The GridView, DetailsView, and FormView Controls |
|
|
105 | (64) |
|
|
106 | (36) |
|
An Overview of the GridView Control |
|
|
106 | (1) |
|
Declaring a GridView Control |
|
|
107 | (16) |
|
Defining the Columns in a GridView Control |
|
|
123 | (13) |
|
Using a Mixture of Column Types |
|
|
136 | (6) |
|
|
142 | (14) |
|
Using a Stand-Alone Details View Control |
|
|
143 | (2) |
|
Creating a Master-Detail Page with GridView and Details View Controls |
|
|
145 | (1) |
|
Inserting and Editing Rows with a Details View Control |
|
|
146 | (4) |
|
The Details View Control Interface |
|
|
150 | (6) |
|
|
156 | (5) |
|
Declaring a FormView Control |
|
|
156 | (1) |
|
Declaring Templates for a FormView Control |
|
|
157 | (4) |
|
The New and Simplified Data Binding Syntax |
|
|
161 | (5) |
|
The ASP.NET 1.0 Syntax for Data Binding |
|
|
161 | (1) |
|
Simplified ASP.NET 2.0 Syntax for Nonhierarchical Data Binding |
|
|
162 | (1) |
|
Simplified ASP.NET 2.0 Syntax for Hierarchical (XML) Data Binding |
|
|
162 | (2) |
|
Two-Way Data Binding Syntax for Templated Controls |
|
|
164 | (2) |
|
New and Simplified Data Binding Syntax Options |
|
|
166 | (1) |
|
Building Data-Bound Pages with Visual Studio 2005 |
|
|
166 | (2) |
|
|
168 | (1) |
|
5 Master Pages and Navigation |
|
|
169 | (34) |
|
|
169 | (14) |
|
|
170 | (2) |
|
|
172 | (2) |
|
|
174 | (1) |
|
|
174 | (5) |
|
Master Page Configuration |
|
|
179 | (1) |
|
Device-Specific Master Pages |
|
|
180 | (1) |
|
|
181 | (1) |
|
Setting the Master Page Programmatically |
|
|
181 | (1) |
|
Accessing the Master Page |
|
|
181 | (2) |
|
|
183 | (19) |
|
|
184 | (1) |
|
|
184 | (2) |
|
Site Map Configuration Files |
|
|
186 | (2) |
|
|
188 | (1) |
|
|
189 | (3) |
|
Showing a Navigation Path |
|
|
192 | (3) |
|
|
195 | (2) |
|
|
197 | (1) |
|
Accessing the Site Map at Runtime |
|
|
198 | (1) |
|
|
199 | (3) |
|
|
202 | (1) |
|
|
203 | (50) |
|
|
206 | (18) |
|
|
208 | (1) |
|
|
209 | (1) |
|
|
209 | (4) |
|
Validating User Credentials |
|
|
213 | (1) |
|
|
213 | (5) |
|
The Membership User Class |
|
|
218 | (3) |
|
Updating a User's Properties |
|
|
221 | (1) |
|
|
222 | (2) |
|
|
224 | (10) |
|
The CreateUserWizard Control |
|
|
224 | (1) |
|
|
225 | (2) |
|
|
227 | (2) |
|
|
229 | (2) |
|
The Password Recovery Control |
|
|
231 | (3) |
|
|
234 | (11) |
|
|
235 | (2) |
|
|
237 | (2) |
|
|
239 | (1) |
|
|
240 | (2) |
|
Checking Whether a User Is in a Role |
|
|
242 | (1) |
|
Removing Users from Roles |
|
|
242 | (1) |
|
|
242 | (2) |
|
|
244 | (1) |
|
Cookieless Forms Authentication |
|
|
245 | (2) |
|
Enabling Cookieless Forms Authentication |
|
|
245 | (2) |
|
The Web Site Administration Tool |
|
|
247 | (4) |
|
|
248 | (1) |
|
|
248 | (1) |
|
|
249 | (2) |
|
|
251 | (1) |
|
|
251 | (2) |
|
7 Personalization and Themes |
|
|
253 | (46) |
|
Storing and Retrieving User Personalization Data |
|
|
255 | (16) |
|
Configuring Personalization |
|
|
256 | (5) |
|
Accessing Other Users' Personalization Data |
|
|
261 | (1) |
|
Setting Up the Databases for Personalization |
|
|
261 | (7) |
|
Data Access Optimizations |
|
|
268 | (3) |
|
Membership and Personalization |
|
|
271 | (1) |
|
|
271 | (2) |
|
Anonymous Personalization |
|
|
273 | (3) |
|
Migrating from Anonymous to Authenticated Users |
|
|
275 | (1) |
|
The Provider Design Pattern |
|
|
276 | (3) |
|
|
276 | (2) |
|
Implementation of the ProviderBase Base Class |
|
|
278 | (1) |
|
Implementation of the Feature-Specific Interface |
|
|
279 | (1) |
|
Writing a Personalization Provider |
|
|
279 | (5) |
|
Configuring Profile Properties |
|
|
284 | (2) |
|
|
286 | (12) |
|
|
286 | (1) |
|
Customization Themes and Stylesheet Themes |
|
|
287 | (1) |
|
|
287 | (1) |
|
|
287 | (3) |
|
Setting a Page Customization Theme |
|
|
290 | (1) |
|
Setting a Page Stylesheet Theme |
|
|
290 | (1) |
|
|
291 | (1) |
|
Applying Skins to All Controls |
|
|
292 | (1) |
|
Applying Skins to Dynamically Created Controls |
|
|
292 | (1) |
|
Allowing User Selection of Skins 293` |
|
|
|
Using Personalization for Themes |
|
|
293 | (2) |
|
|
295 | (1) |
|
|
296 | (1) |
|
|
297 | (1) |
|
Enabling Themes in Custom Controls |
|
|
297 | (1) |
|
|
298 | (1) |
|
8 Web Parts and the Portal Framework |
|
|
299 | (42) |
|
The ASP.NET 2.0 Portal Framework |
|
|
300 | (6) |
|
The Goals of the Portal Framework |
|
|
301 | (3) |
|
About the Web Parts Framework |
|
|
304 | (2) |
|
A Simple Web Parts Example Page |
|
|
306 | (16) |
|
An Overall View of the Example Page |
|
|
306 | (5) |
|
The Events Zone Declaration |
|
|
311 | (1) |
|
The Web Part User Control Declarations |
|
|
312 | (2) |
|
|
314 | (3) |
|
|
317 | (1) |
|
Page Design and Web Part Editing |
|
|
318 | (3) |
|
Help Features for Web Parts |
|
|
321 | (1) |
|
|
322 | (2) |
|
Declaring Static Connections |
|
|
323 | (1) |
|
Editing Web Part Connections |
|
|
323 | (1) |
|
Working with Web Parts in Code |
|
|
324 | (15) |
|
|
326 | (4) |
|
|
330 | (5) |
|
|
335 | (4) |
|
Web Parts and Visual Studio 2005 |
|
|
339 | (1) |
|
|
340 | (1) |
|
9 Pages, Posting, Resources, and Validation |
|
|
341 | (52) |
|
|
342 | (4) |
|
|
342 | (1) |
|
Accessing the Previous Page |
|
|
343 | (1) |
|
Transferring to Another Page in Code |
|
|
344 | (1) |
|
Detecting Cross-Page Posting |
|
|
345 | (1) |
|
|
346 | (1) |
|
Posting to Another Application |
|
|
346 | (1) |
|
|
346 | (3) |
|
The ValidationGroup Property |
|
|
347 | (2) |
|
The SetFocusOnError Property |
|
|
349 | (1) |
|
The ValidateEmptyText Property |
|
|
349 | (1) |
|
|
349 | (2) |
|
Client-Side Script Features |
|
|
351 | (10) |
|
Registering Script Blocks |
|
|
351 | (1) |
|
|
352 | (9) |
|
|
361 | (2) |
|
|
362 | (1) |
|
|
362 | (1) |
|
Submitting Disabled Controls |
|
|
363 | (1) |
|
Changes to Page Directives |
|
|
363 | (3) |
|
|
364 | (1) |
|
|
364 | (1) |
|
|
365 | (1) |
|
The PreviousPageType Directive |
|
|
365 | (1) |
|
|
366 | (1) |
|
|
366 | (1) |
|
The Page and Control Life Cycle |
|
|
367 | (2) |
|
|
369 | (8) |
|
|
371 | (3) |
|
Configuring Site and Page Counters |
|
|
374 | (3) |
|
Resources and Localization |
|
|
377 | (11) |
|
|
377 | (9) |
|
What Expression Type to Use, and When |
|
|
386 | (1) |
|
User-Selectable Localization |
|
|
386 | (1) |
|
Programmatic Access of Resources |
|
|
387 | (1) |
|
|
388 | (1) |
|
|
388 | (2) |
|
|
390 | (3) |
10 The New Browser and Mobile Device Controls |
|
393 | (74) |
|
Programming for Different Types of Devices |
|
|
394 | (2) |
|
The Microsoft Mobile Internet Toolkit |
|
|
395 | (1) |
|
The Unified Control and Adapter Architecture |
|
|
396 | (8) |
|
|
400 | (1) |
|
The BrowserCapabilities Class |
|
|
401 | (1) |
|
Page Design and Device Support |
|
|
402 | (1) |
|
|
402 | (2) |
|
Summary of the New Controls in AS'P.NET 2.0 |
|
|
404 | (4) |
|
Standard Form- and Page-Based Controls |
|
|
404 | (1) |
|
|
405 | (1) |
|
Login and Authentication Controls |
|
|
406 | (1) |
|
Navigation Controls and Counters |
|
|
406 | (1) |
|
Data Access and Display Controls |
|
|
407 | (1) |
|
|
408 | (1) |
|
The New Controls in Detail |
|
|
408 | (47) |
|
New Controls within the HtmlControls Namespace |
|
|
408 | (10) |
|
|
418 | (5) |
|
|
423 | (4) |
|
The Image Generation Service |
|
|
427 | (2) |
|
|
429 | (5) |
|
|
434 | (3) |
|
|
437 | (2) |
|
The MultiView and View Controls |
|
|
439 | (7) |
|
|
446 | (9) |
|
Controls and Attributes Specific to Mobile Devices |
|
|
455 | (9) |
|
|
456 | (6) |
|
|
462 | (1) |
|
The SoftKeyLabel Attribute |
|
|
463 | (1) |
|
|
464 | (1) |
|
|
465 | (2) |
11 Enhancements to Existing Controls |
|
467 | (40) |
|
Summary of New Control Features |
|
|
468 | (5) |
|
Accessibility Improvements |
|
|
468 | (1) |
|
Input Control Enhancements |
|
|
469 | (1) |
|
Changes to the Forms and Postback Architecture |
|
|
470 | (1) |
|
Validation Controls and Validation Groups |
|
|
470 | (1) |
|
Data Source Control Integration |
|
|
471 | (1) |
|
|
471 | (1) |
|
Site and Page Counter Integration |
|
|
472 | (1) |
|
List Control Enhancements |
|
|
472 | (1) |
|
|
472 | (1) |
|
Tables of Control Enhancements |
|
|
473 | (8) |
|
Enhancements to Existing Controls in the HtmlControls Namespace |
|
|
473 | (1) |
|
Enhancements to Existing Controls in the WebControls Namespace |
|
|
474 | (7) |
|
Details of Individual Control Enhancements |
|
|
481 | (24) |
|
|
481 | (6) |
|
The Button, LinkButton, and ImageButton Controls |
|
|
487 | (1) |
|
|
488 | (1) |
|
|
489 | (1) |
|
|
490 | (1) |
|
|
491 | (1) |
|
|
491 | (1) |
|
The List and Listltem Controls |
|
|
492 | (3) |
|
|
495 | (1) |
|
|
496 | (2) |
|
The Table, TableHeaderCell, and TableCell Controls |
|
|
498 | (7) |
|
|
505 | (2) |
12 Caching |
|
507 | (16) |
|
Enabling Database Cache Invalidation |
|
|
510 | (4) |
|
Enabling a Database for SQL Cache Invalidation |
|
|
512 | (1) |
|
Enabling a Table for SQL Cache Invalidation |
|
|
512 | (1) |
|
Listing Tables Enabled for SQL Cache Invalidation |
|
|
513 | (1) |
|
Invalidating the ASP.NET Cache |
|
|
514 | (4) |
|
|
514 | (1) |
|
Invalidating Output-Cached Pages |
|
|
515 | (3) |
|
The SqlCacheDependency Class |
|
|
518 | (2) |
|
Creating SQL Server 7 and 2000 Dependencies |
|
|
519 | (1) |
|
Creating SQL Server 2005 Dependencies |
|
|
519 | (1) |
|
The CacheDependency Class |
|
|
520 | (1) |
|
|
521 | (2) |
13 Configuration and Administration |
|
523 | (62) |
|
Application Configuration Files |
|
|
524 | (46) |
|
|
524 | (9) |
|
|
533 | (37) |
|
|
570 | (6) |
|
|
571 | (1) |
|
|
572 | (1) |
|
Session State Plugability |
|
|
573 | (3) |
|
The Web Site Administration Tool |
|
|
576 | (4) |
|
|
580 | (1) |
|
|
581 | (3) |
|
|
582 | (2) |
|
|
584 | (1) |
Index |
|
585 | |