You are previewing ASP.NET 3.5 AJAX Unleashed.
O'Reilly logo
ASP.NET 3.5 AJAX Unleashed

Book Description

As the Internet user experience (UX) progresses, more users are demanding and expecting their custom-built business applications to provide the same UX that they see on the Internet every day. ASP.NET 3.5 AJAX Unleashed empowers ASP.NET developers to easily provide this type of experience with minimal code. Author Rob Foster has built AJAX-enabled web applications for a number of major corporations and uses the experience he has gained there to explain concisely, clearly, and completely what ASP.NET developers need to learn to start taking advantage of the rich opportunities made possible by ASP.NET AJAX.

  • Learn ASP.NET AJAX by working with real-world examples

  • Use the ScriptManager and ScriptManagerProxy controls in your ASP.NET AJAX-enabled applications

  • Leverage the ASP.NET AJAX client-side API to maximize the flexibility of ASP.NET AJAX

  • Build applications that use the UpdatePanel and Timer controls

  • Use the ASP.NET AJAX Control Toolkit to provide rich AJAX functionality to your web applications

  • Build ASP.NET AJAX-enabled extender controls

  • Integrate ASP.NET AJAX and .NET 3.5 with Microsoft Office SharePoint Server 2007

  • Create ASP.NET AJAX-enabled Windows Vista Gadgets

  • Learn advanced AJAX concepts such as JavaScript Object Notation (JSON) and WCF Web services

  • Introduction     1

    Part I Introduction

    Chapter 1 Introduction to AJAX Technologies     5

     AJAX and Web 2.0     6

     Why Use AJAX?      7

     AJAX Rationale     7

     AJAX: An Example     8

     The XMLHttpRequest Object     8

     A Simple AJAX Library     10

     Using the AJAX Library     14

     Summary     20

    Chapter 2 Introduction to ASP.NET AJAX     21

     Introducing the Visual Studio Controls     22

     ScriptManager     22

     ScriptManagerProxy     23

     Timer     23

     UpdatePanel     23

     UpdateProgress     23

     Introducing the Visual Studio Projects and Web Site Items     24

     Projects     24

     Web Site Items     25

     Introducing the AJAX Control Toolkit     26

     Summary     27

    Part II Working with ASP.NET 3.5 AJAX

    Chapter 3 The ScriptManager and ScriptManagerProxy Controls     31

     About the ScriptManager Control.      31

     ScriptManager Properties, Methods, and Events     34

     JavaScript Proxy Classes for Web Services     37

     Partial-Page Rendering     43

     Summary     47

    Chapter 4 The ASP.NET AJAX Client API     49

     The Namespaces     49

     Global     49

     Sys     52

     Sys.Net     53

     Sys.Serialization     54

     Sys.Services     62

     Sys.UI     66

     Sys.WebForms     68

     Summary     71

    Chapter 5 The UpdatePanel and Timer Controls     73

     About the UpdatePanel Control     73

     Using the UpdatePanel Control     74

     Advanced Features of the UpdatePanel Control     78

     Triggers     78

     Multiple UpdatePanel Controls on a Single Page     81

     The Timer Control     89

     Using the Timer Control with Partial-Page Rendering     90

     Summary     92

    Chapter 6 Advanced Techniques with the ASP.NET AJAX PageRequestManager Object     93

     Using the PageRequestManager Object     93

     A Practical Example of the PageRequestManager Object     95

     Summary     100

    Chapter 7 Using the ASP.NET AJAX Control Toolkit     101

     ASP.NET AJAX Control Toolkit: The Controls     102

     Using Controls in the ASP.NET AJAX Control Toolkit     105

     Configuring Visual Studio to Use the Toolkit     105

     The Accordion and AccordionPane Controls     106

     The CalendarExtender Control     110

     The CollapsiblePanelExtender Control     112

     The ConfirmButtonExtender Control     118

     The DragPanelExtender Control     120

     The DropDownExtender Control     122

     The FilteredTextBoxExtender Control     125

     The HoverMenuExtender Control     127

     The TextBoxWatermarkExtender Control     130

     ASP.NET AJAX Control Toolkit: A Practical Example     134

     Using the ASP.NET AJAX Control Toolkit with Microsoft Expression Web     145

     Configuring Expression Web for the ASP.NET AJAX

     Control Toolkit     145

     Summary      150

    Cha

    Table of Contents

    1. Copyright
      1. Dedication
    2. About the Author
    3. Acknowledgments
    4. We Want to Hear from You!
    5. Reader Services
    6. Introduction
    7. I. Introduction
      1. 1. Introduction to AJAX Technologies
        1. AJAX and Web 2.0
        2. Why Use AJAX?
          1. AJAX Rationale
        3. AJAX: An Example
          1. The XMLHttpRequest Object
          2. A Simple AJAX Library
        4. Using the AJAX Library
        5. Summary
      2. 2. Introduction to ASP.NET AJAX
        1. Introducing the Visual Studio Controls
          1. ScriptManager
          2. ScriptManagerProxy
          3. Timer
          4. UpdatePanel
          5. UpdateProgress
        2. Introducing the Visual Studio Projects and Web Site Items
          1. Projects
            1. ASP.NET AJAX Server Control
            2. ASP.NET AJAX Server Control Extender
          2. Web Site Items
        3. Introducing the AJAX Control Toolkit
        4. Summary
    8. II. Working with ASP.NET 3.5 AJAX
      1. 3. The ScriptManager and ScriptManagerProxy Controls
        1. About the ScriptManager Control
          1. ScriptManager Properties, Methods, and Events
            1. Properties
            2. Methods
            3. Events
        2. JavaScript Proxy Classes for Web Services
        3. Partial-Page Rendering
        4. Summary
      2. 4. The ASP.NET AJAX Client API
        1. The Namespaces
        2. Global
        3. Sys
        4. Sys.Net
        5. Sys.Serialization
        6. Sys.Services
        7. Sys.UI
        8. Sys.WebForms
        9. Summary
      3. 5. The UpdatePanel and Timer Controls
        1. About the UpdatePanel Control
        2. Using the UpdatePanel Control
        3. Advanced Features of the UpdatePanel Control
          1. Triggers
          2. Multiple UpdatePanel Controls on a Single Page
        4. The Timer Control
          1. Using the Timer Control with Partial-Page Rendering
        5. Summary
      4. 6. Advanced Techniques with the ASP.NET AJAX PageRequestManager Object
        1. Using the PageRequestManager Object
        2. A Practical Example of the PageRequestManager Object
        3. Summary
      5. 7. Using the ASP.NET AJAX Control Toolkit
        1. ASP.NET AJAX Control Toolkit: The Controls
        2. Using Controls in the ASP.NET AJAX Control Toolkit
          1. Configuring Visual Studio to Use the Toolkit
          2. The Accordion and AccordionPane Controls
          3. The CalendarExtender Control
          4. The CollapsiblePanelExtender Control
          5. The ConfirmButtonExtender Control
          6. The DragPanelExtender Control
          7. The DropDownExtender Control
          8. The FilteredTextBoxExtender Control
          9. The HoverMenuExtender Control
          10. The TextBoxWatermarkExtender Control
        3. ASP.NET AJAX Control Toolkit: A Practical Example
        4. Using the ASP.NET AJAX Control Toolkit with Microsoft Expression Web
          1. Configuring Expression Web for the ASP.NET AJAX Control Toolkit
        5. Summary
      6. 8. Building an ASP.NET AJAX Extender Control
        1. Add ASP.NET Controls
        2. How to Build an Extender Control
        3. Server-Side Code
        4. Client-Side Code
        5. Summary
      7. 9. ASP.NET AJAX and SharePoint 2007
        1. SharePoint and AJAX
        2. Modifying Web.Config
        3. Developing an AJAX-Based SharePoint Web Part
        4. Summary
      8. 10. Creating ASP.NET AJAX-Enabled Vista Sidebar Gadgets
        1. Vista Sidebar Gadgets
        2. Creating the Gadget
          1. Create the Web Service
          2. Generate the JavaScript Proxy
          3. Create the Vista Gadget
          4. Test the Gadget
        3. Summary
    9. III. Appendices
      1. A. Microsoft Expression Web
        1. An Introduction to the Expression Web Interface
          1. Creating Web Pages and Web Sites
            1. Create a New Web Page
            2. Create a New Web Site
          2. Customizable Interface
            1. Folder List
            2. Tag Properties
            3. CSS Properties
            4. Toolbox
            5. Apply Styles
            6. Manage Styles
        2. Creating Standards-Based Web Sites
          1. Quickly Build Standards-Based Sites
        3. Code Formatting and IntelliSense
          1. Autoformatting Code
          2. IntelliSense
        4. XML and XSLT Tools in Expression Web
          1. Drag and Drop XML
          2. Creating and Updating XSL
        5. Summary
      2. B. Deploying the .NET Framework 3.5 as a SharePoint Feature
        1. Features and Solutions
        2. Creating the Solution
          1. Using Visual Studio
        3. Creating the Feature Receiver
        4. Deploying the Solution to SharePoint
          1. Compiling the Solution
          2. Running STSADM.EXE to Register the Solution
          3. Deploying the Solution Using SharePoint Central Management
          4. Activating the Feature
        5. Summary