Book Image

Microsoft AJAX Library Essentials: Client-side ASP.NET AJAX 1.0 Explained

Book Image

Microsoft AJAX Library Essentials: Client-side ASP.NET AJAX 1.0 Explained

Overview of this book

Microsoft AJAX Library Essentials is a practical reference for the client-side library of the ASP.NET AJAX Framework 1.0, and a tutorial for the underlying technologies and techniques required to use the library at its full potential. The main goal of this book is to get you comfortable with the Microsoft AJAX Library, a huge set of functions that can be used for developing powerful client-side functionality.Beginning with a hands-on tour of the basic technologies associated with AJAX, JavaScript, XMLHttpRequest, JSON, and the DOM, you'll move on to a crash course in the Microsoft AJAX tools. You will learn, through numerous step-by-step exercises, how to create basic AJAX applications, how the object-based programming model of JavaScript works, and how Microsoft AJAX Library extends this model. You'll understand the architecture of the Microsoft AJAX components, how they all fit together, and exactly what they can do for you. Then you will learn how to use the Microsoft AJAX Library in your web projects, and a detailed case study will walk you through creating your own customized client components. At every stage of your journey, you'll be able to try out examples to illuminate the theory, and consolidate your understanding. In addition to learning about the client and server controls, you'll also see how to handle errors and debug your AJAX applications.To complement your new found skills, the book ends with a visual reference of the Microsoft AJAX Library namespaces and classes, including diagrams and quick explanations for all the classes mentioned in the book, providing an invaluable reference you will turn to again and again.
Table of Contents (14 chapters)
Copyright
Credits
About the Authors
About the Reviewers
Preface

Working with WebRequest


For the rest of this chapter, we’ll go through two simple exercises to implement the QuickStart example from Chapter 1, but this time using the Microsoft AJAX Library. This exercise will demonstrate how the WebRequest class can be used to perform AJAX requests. Look ahead at Figures 4-6 and 4-7 to see where we’re heading, and start typing.

Time for Action—WebRequest

  1. 1. Open the http://localhost/Atlas web application in Visual Web Developer 2005.

  2. 2. Create a folder named Scripts in your project. We’ll use this folder to store the files of the Microsoft AJAX Library, and other JavaScript files we’ll create.

  3. 3. Copy all the files in \Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\version\MicrosoftAjaxLibrary\System.Web.Extensions\version\ to your Scripts folder. After this operation, your Scripts folder should contain MicrosoftAjax.js, MicrosoftAjaxTimer.js, MicrosoftAjaxWebForms.js, their debug versions, and other JavaScript source files. The files we’re interested...