مشخصات کتاب
-
Christian Wenz
-
2010
-
انگلیسی
-
29177
-
880
-
0
Programming ASP.NET AJAX
Part I. Basics
1. ASP.NET AJAX, Ajax, and ASP.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
ASP.NET AJAX and Ajax 3
ASP.NET AJAX and ASP.NET 5
ASP.NET AJAX Prerequisites and Installation 6
ASP.NET AJAX Structure and Architecture 12
A First ASP.NET AJAX Example: Hello User 14
The ScriptManager Control 19
Summary 21
For Further Reading 21
2. JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
The JavaScript Language 24
Object-Oriented Programming (OOP) 34
Accessing Page Elements 38
DOM Methods 42
Summary 43
For Further Reading 43
3. Ajax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
The XMLHttpRequest Object 45
The XMLDocument Object 55
JSON 61
Summary 64
For Further Reading 64Part II. ASP.NET AJAX Extensions
4. Using ASP.NET AJAX JavaScript Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
ASP.NET AJAX Shortcuts and Helper Functions 67
Extensions to Existing JavaScript Objects 70
ASP.NET AJAX OOP Features for JavaScript 71
Client Versions of .NET Classes 83
Summary 87
For Further Reading 87
5. Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Error Handling 88
Page Methods 93
Maintaining Session State 95
Exchanging Complex Data with the Server 100
Consuming Web Services with JavaScript 105
Summary 114
For Further Reading 115
6. UpdatePanel: Refreshing Only Parts of a Page . . . . . . . . . . . . . . . . . . . . . . . . 116
Making a Page Region Updatable 116
Summary 131
For Further Reading 132
7. Using the ASP.NET AJAX Profile Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Preparing the Web Site 133
Accessing Profile Data 135
Accessing Profile Group Data 139
Summary 144
For Further Reading 144
8. Using the ASP.NET AJAX Authentication Service . . . . . . . . . . . . . . . . . . . . . . . 145
Preparing the Application 145
Login and Logout 148
Summary 154
For Further Reading 1549. Localizing and Globalizing Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Localization 156
Globalization and Internationalization 169
Summary 173
For Further Reading 173
Part III. ASP.NET AJAX Control Toolkit
10. Using the Control Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Installing the Control Toolkit 177
Using the Control Toolkit 181
Summary 184
For Further Reading 184
11. Adding Animation to a Web Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Animation Framework 185
Drag-and-Drop 193
Summary 195
For Further Reading 196
12. Autocompleting User Input, Fighting Spam, and More . . . . . . . . . . . . . . . . 197
Creating an Accordion Pane 197
Maintaining the Relative Position of an Element 199
Adding Autocomplete Behavior to a TextBox Control 201
Attaching a Calendar to a Text Field 208
Dynamically Collapsing a Single Panel 210
Displaying a Pop Up Over a Page 211
Fighting Spam in Blogs and in Other Entry Forms 214
Creating a Tabbed Interface 216
Summary 218
For Further Reading 218
13. Writing Custom Controls and Contributing to the Community . . . . . . . . . . 219
Writing Custom ASP.NET AJAX Controls 219
Contributing to the Control Toolkit 228
Summary 237
For Further Reading 237Part IV. ASP.NET AJAX Futures
14. Client Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Introducing ASP.NET AJAX Client Controls 241
Using ASP.NET AJAX Controls 242
Handling Control Events 259
Summary 263
For Further Reading 263
15. Binding and Validating Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Data Binding 264
Data Validation 280
Summary 296
For Further Reading 296
16. Using Behaviors and Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Using Behaviors 297
Using Components 310
Summary 313
For Further Reading 313
17. Using Server Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Using a ListView Control 314
Creating a Custom Data Source 330
Summary 336
For Further Reading 336
18. Using Remote Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Using the Google Web Service 338
Using the Amazon Web Service 345
Transforming a Web Service Result with XSLT 350
Using the Yahoo! Web Service (and REST and XPath) 358
Summary 367
For Further Reading 367
19. Using Animations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Using Animations 368
Using an Animation to Create a Fade Effect 370Summary 380
For Further Reading 380
20. Fixing Bookmarks and Back/Forward Buttons . . . . . . . . . . . . . . . . . . . . . . . . 381
Fixing with Code 382
Fixing Bookmarks and Back/Forward Buttons with Controls Using
UpdateHistory 384
Fixing Bookmarks and Back/Forward Buttons with Controls Using the
ASP.NET AJAX Futures 388
Summary 395
For Further Reading 395
21. Web Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Using ASP.NET AJAX with ASP.NET Web Parts 396
Summary 401
For Further Reading 401
Part V. Microsoft AJAX Library
22. Using ASP.NET AJAX with Other Server Technologies . . . . . . . . . . . . . . . . . . . 405
Using ASP.NET AJAX with PHP 406
Summary 409
For Further Reading 410
Part VI. Appendixes
A. Debugging ASP.NET AJAX Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
B. XMLHttpRequest Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
C. DOM Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
D. ASP.NET AJAX Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
E. ScriptManager, UpdatePanel, UpdateProgress, and Timer
Declarative Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439