Book 40


Book 50

This Wrox Blox will teach you how to create and customize ASP.NET 4 AJAX Preview 4 Client Templates. The author shows you how to use declarative as well as imperative data-binding techniques to address the simple to advanced UI requirements. He also covers how the observer pattern is fully implemented in ASP.NET 4 AJAX and, when used in conjunction with the Client Template markup extensions, provides a developer experience much like XAML-based applications like WPF and Silverlight. This Wrox Blox walks you through how to implement examples that fetch data from ASP.NET Web Forms using Page Methods and ASP.NET MVC controller actions, as well as interfacing directly with ADO.NET Data Services.

Table of Contents

What's New in ASP.NET 4 AJAX Preview 4 1

What Are Client Templates? 1

Environment Setup 3

Scripts Files 3

DataView 3

Updating a DataView 8

Data-Binding Syntax 10

Observer Pattern in JavaScript 16

Update the List Editor 19

Create the Page 20

Template Manipulation 23

Pseudo-Columns 24

Code Injection 24

Fetching Data from the Server 27

Using ASP.NET Page Methods 28

Using an ASP.NET MVC Controller Action 30

Using ADO.NET Data Services 31

Wrapping Up 39

About Craig Shoemaker 40