You are previewing Programming ASP.NET AJAX.
O'Reilly logo
Programming ASP.NET AJAX

Book Description

Delivering rich, Web 2.0-style experiences has never been easier. This book gives you a complete hands-on introduction to Microsoft ASP.NET AJAX 1.0, the new framework that offers many of the same benefits for Ajax development that ASP.NET provides for server-side development. With Programming ASP.NET AJAX, you'll learn how to create professional, dynamic web pages with Ajax in no time. Loaded with code and examples that demonstrate key aspects of the framework, this book is ideal not only for ASP.NET developers who want to take their applications a step further with Ajax, but for any web developers interested in ASP.NET AJAX, no matter what technology they use currently. That includes JavaScript programmers who would like to avoid the headaches of writing cross-browser code. Programming ASP.NET AJAX offers you:

  • A high-level overview of the ASP.NET AJAX framework

  • Functional code that you can cut and paste for use in your own applications

  • The essentials of JavaScript and Ajax to help you understand individual technologies used by the framework

  • An organization that reflects the framework's packages, including Extensions, Control Toolkit, the Futures CTP, and the AJAX Library

  • Sidebars throughout the book that identify and propose solutions to potential security breaches

  • Ways to use the standards-based AJAX Library with other platforms, such as PHP

  • A complete chapter on the UpdatePanel control for making individual parts of a web page independently updateable -- one of the framework's most important elements

Released previously as Programming Atlas to cover the beta version of the Microsoft framework, this edition is fully up-to-date and expanded for the official 1.0 release of ASP.NET AJAX. Written by Christian Wenz -- Microsoft MVP for ASP/ASP.NET and AJAX Control Toolkit Contributor -- Programming ASP.NET AJAX contains many hard-to-find details, along with a few unofficial ways to accomplish things.

Table of Contents

  1. Programming ASP.NET AJAX
    1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
    2. A Note Regarding Supplemental Files
    3. Preface
      1. Who This Book Is For
      2. How This Book Is Organized
      3. What You Need to Use This Book
      4. Conventions Used in This Book
      5. Using Code Examples
      6. How to Contact Us
      7. Safari® Books Online
      8. Acknowledgments (Programming Atlas)
      9. Acknowledgments (Programming ASP.NET AJAX)
    4. I. Basics
      1. 1. ASP.NET AJAX, Ajax, and ASP.NET
        1. ASP.NET AJAX and Ajax
        2. ASP.NET AJAX and ASP.NET
          1. ASP.NET AJAX Packages
        3. ASP.NET AJAX Prerequisites and Installation
          1. Installing the IDE
          2. Installing ASP.NET AJAX
          3. Installing the Sample Database
        4. ASP.NET AJAX Structure and Architecture
        5. A First ASP.NET AJAX Example: Hello User
        6. The ScriptManager Control
        7. Summary
        8. For Further Reading
      2. 2. JavaScript
        1. The JavaScript Language
          1. Common JavaScript Methods
          2. Variables
          3. Arrays
          4. Control Structures
          5. Built-in Methods, Custom Functions, and Event Handling
        2. Object-Oriented Programming (OOP)
        3. Accessing Page Elements
          1. Accessing Form Elements
          2. Accessing Arbitrary Elements
        4. DOM Methods
        5. Summary
        6. For Further Reading
      3. 3. Ajax
        1. The XMLHttpRequest Object
          1. Programming the XMLHttpRequest Object
        2. The XMLDocument Object
        3. JSON
        4. Summary
        5. For Further Reading
    5. II. ASP.NET AJAX Extensions
      1. 4. Using ASP.NET AJAX JavaScript Extensions
        1. ASP.NET AJAX Shortcuts and Helper Functions
          1. Shortcuts
          2. DOM Element Methods
        2. Extensions to Existing JavaScript Objects
        3. ASP.NET AJAX OOP Features for JavaScript
          1. Namespaces
          2. Class Inheritance
            1. Derived classes
            2. Accessing base methods
          3. Interfaces
        4. Client Versions of .NET Classes
          1. Sys.StringBuilder
          2. Enumerations
        5. Summary
        6. For Further Reading
      2. 5. Web Services
        1. Error Handling
        2. Page Methods
        3. Maintaining Session State
        4. Exchanging Complex Data with the Server
        5. Consuming Web Services with JavaScript
          1. Web Services and Internet Explorer
          2. Web Services and Mozilla Browsers
          3. Web Services with Both Browsers
        6. Summary
        7. For Further Reading
      3. 6. UpdatePanel: Refreshing Only Parts of a Page
        1. Making a Page Region Updatable
          1. Updating a Section
          2. Updating a Section at Timed Intervals
          3. Programmatically Updating a Section at Timed Intervals
          4. Displaying a Wait Screen
          5. Managing the Asynchronous Requests
        2. Summary
        3. For Further Reading
      4. 7. Using the ASP.NET AJAX Profile Service
        1. Preparing the Web Site
        2. Accessing Profile Data
        3. Accessing Profile Group Data
        4. Summary
        5. For Further Reading
      5. 8. Using the ASP.NET AJAX Authentication Service
        1. Preparing the Application
        2. Login and Logout
        3. Summary
        4. For Further Reading
      6. 9. Localizing and Globalizing Applications
        1. Localization
          1. Localizing Scripts
          2. Using Satellite Resources from ASP.NET AJAX
        2. Globalization and Internationalization
        3. Summary
        4. For Further Reading
    6. III. ASP.NET AJAX Control Toolkit
      1. 10. Using the Control Toolkit
        1. Installing the Control Toolkit
        2. Using the Control Toolkit
        3. Summary
        4. For Further Reading
      2. 11. Adding Animation to a Web Page
        1. Animation Framework
          1. Animation Basics
            1. Animation events
            2. Animation types
          2. Complex Animations
          3. Programming Animations
        2. Drag-and-Drop
        3. Summary
        4. For Further Reading
      3. 12. Autocompleting User Input, Fighting Spam, and More
        1. Creating an Accordion Pane
        2. Maintaining the Relative Position of an Element
        3. Adding Autocomplete Behavior to a TextBox Control
        4. Attaching a Calendar to a Text Field
        5. Dynamically Collapsing a Single Panel
        6. Displaying a Pop Up Over a Page
        7. Fighting Spam in Blogs and in Other Entry Forms
        8. Creating a Tabbed Interface
        9. Summary
        10. For Further Reading
      4. 13. Writing Custom Controls and Contributing to the Community
        1. Writing Custom ASP.NET AJAX Controls
        2. Contributing to the Control Toolkit
        3. Summary
        4. For Further Reading
    7. IV. ASP.NET AJAX Futures
      1. 14. Client Controls
        1. Introducing ASP.NET AJAX Client Controls
        2. Using ASP.NET AJAX Controls
          1. Accessing JavaScript Methods
          2. Accessing HTML Elements
          3. Labels
          4. Images
          5. Hyperlinks
          6. Buttons
          7. Checkboxes
          8. Selection Lists
          9. Text Fields
          10. Base Methods
        3. Handling Control Events
          1. Events for Buttons
          2. Events for Lists
        4. Summary
        5. For Further Reading
      2. 15. Binding and Validating Data
        1. Data Binding
          1. Using Code for Data Bindings
            1. Programmatic data binding using a built-in transformer
            2. Binding direction
            3. Creating a custom transformer
          2. Using Markup for Data Binding: xml-script
            1. Data bindings
            2. Event handling
            3. Method invocation
        2. Data Validation
          1. Checking a Required Field
          2. Checking Against a Regular Expression
          3. Checking the Data Type
          4. Checking a Range
          5. Custom Validation
          6. Programmatic Validation
          7. Validation Groups
          8. Preventing Form Submission
        3. Summary
        4. For Further Reading
      3. 16. Using Behaviors and Components
        1. Using Behaviors
          1. Using the Click Behavior
          2. Using the Drag-and-Drop Behavior
          3. Using the Drag-and-Drop Extender
          4. Personalized Drag-and-Drop
        2. Using Components
          1. Using the Timer Component
        3. Summary
        4. For Further Reading
      4. 17. Using Server Data
        1. Using a ListView Control
          1. Binding a ListView Control to Data
          2. Binding Data to an HTML Table
        2. Creating a Custom Data Source
          1. Displaying Data from a Custom Data Source
        3. Summary
        4. For Further Reading
      5. 18. Using Remote Web Services
        1. Using the Google Web Service
        2. Using the Amazon Web Service
        3. Transforming a Web Service Result with XSLT
        4. Using the Yahoo! Web Service (and REST and XPath)
        5. Summary
        6. For Further Reading
      6. 19. Using Animations
        1. Using Animations
        2. Using an Animation to Create a Fade Effect
          1. Using an Animation to Move an Element
          2. Using a Length Animation to Move an Element
          3. Compositing (Grouping) Animations
        3. Summary
        4. For Further Reading
      7. 20. Fixing Bookmarks and Back/Forward Buttons
        1. Fixing with Code
        2. Fixing Bookmarks and Back/Forward Buttons with Controls Using UpdateHistory
        3. Fixing Bookmarks and Back/Forward Buttons with Controls Using the ASP.NET AJAX Futures
        4. Summary
        5. For Further Reading
      8. 21. Web Parts
        1. Using ASP.NET AJAX with ASP.NET Web Parts
        2. Summary
        3. For Further Reading
    8. V. Microsoft AJAX Library
      1. 22. Using ASP.NET AJAX with Other Server Technologies
        1. Using ASP.NET AJAX with PHP
        2. Summary
        3. For Further Reading
    9. VI. Appendixes
      1. A. Debugging ASP.NET AJAX Applications
        1. Debugging Tools
          1. Firebug for Firefox
          2. Web Development Helper (for Internet Explorer)
        2. Debugging in Visual Studio
        3. Debugging Features in ASP.NET AJAX
        4. Summary
        5. For Further Reading
      2. B. XMLHttpRequest Reference
        1. Methods
        2. Properties
      3. C. DOM Reference
        1. Generic Methods and Properties
          1. Methods
          2. Properties
        2. Document Methods and Properties
          1. Methods
          2. Properties
      4. D. ASP.NET AJAX Reference
        1. Helper Functions
        2. Object Extensions
          1. Array Extensions
          2. Boolean Extensions
          3. Date Extensions
          4. Number Extensions
          5. Object Extensions
          6. String Extensions
      5. E. ScriptManager, UpdatePanel, UpdateProgress, and Timer Declarative Reference
        1. ScriptManager
          1. Properties
          2. AuthenticationService
          3. ProfileService
          4. Scripts
        2. UpdatePanel
          1. Properties
          2. Triggers
        3. UpdateProgress
          1. Properties
        4. Timer
          1. Properties
    10. About the Author
    11. Colophon
    12. SPECIAL OFFER: Upgrade this ebook with O’Reilly