For Richer, Dynamic and Responsive Web Applications
For Richer, Dynamic and Responsive Web Applications
0 AJAX
• What is AJAX?
• ScriptManager
UpdatePanel Control
UpdateProgress Control
Timer Control
Tableofof
Table Contents
Contents
XMLHttpRequest Object
Data Communication
JSON
Ajax (asynchronous JavaScript and XML), or AJAX, is a group of interrelated web development
techniques used for creating interactive web applications or rich Internet applications
Google Suggest provides users with a list Google Maps covers the entire planet,
of options based on keyed-in characters though with varying degrees of granularity.
without refreshing the page. It offers satellite pictures as well as the
usual abstract map representations.
Historyofof
History AJAX?
AJAX?
Examples
• The XMLHttpRequest
object for asynchronous
communication
ASP.NET AJAX is the name of Microsoft’s AJAX solution, and it refers to a set of client and
server technologies that focus on improving web development with Visual Studio
Whyuse
Why use ASP.NET
ASP.NET AJAX?
AJAX?
• Partial-page updates that refresh only the parts of the Web page that have changed.
• Client integration with ASP.NET application services for forms authentication and user
profiles.
• Support for the most popular and generally used browsers, which includes Microsoft
Internet Explorer, Mozilla Firefox, and Apple Safari.
TheClient
The Client and
and Server
Server pieces
pieces of ASP.NET
of ASP.NET AJAX AJAX
It is a JavaScript library that works on a variety of browsers and serves to simplify JavaScript
development.
It is a type system and set of class libraries that simplify writing JavaScript to enhance the user
experience, manipulate the DOM, and communicate with the web server
These extensions build on top of the ASP.NET classes and controls and leverage the Microsoft
AJAX Library sent to the browser.
• They make it easy to quickly take advantage of AJAX technologies by providing a set of
server controls.
• Through a set of standard web services, ASP.NET AJAX is also able to leverage server-based
application services such as authentication and user profile storage
Installing
Installing ASP.NET
ASP.NET AJAX
AJAX
ASP.NET AJAX includes
• The Microsoft AJAX Library, which consists of client script that runs on the browser.
• To add the ASP.NET AJAX Control Toolkit, download and install it from
ASP.NET AJAX Control Toolkit Web site.
If you have Microsoft Visual Studio 2005 installed on your computer, the installation process
installs templates for AJAX-enabled Web site projects.
Anthem.NET: Anthem.NET is a SourceForge project where users are able to download the
sources to the project. It targets ASP.NET 1.1 and ASP.NET 2.0. It has a set of server
controls that use their underlying JavaScript library to communicate with the server
DoJo: It is a client-side library for AJAX development without ties to any server technology.
DoJo has a type system for JavaScript and a function for binding script to events from
JavaScript objects or DHTML elements. One of its strengths is rich support for dynamic
script loading.
AJAXLibraries
AJAX Librariesforfor ASP.NET
ASP.NET
Prototype: It has a type system for scripting in a more object-oriented way. Prototype
provides networking functionality and a method for automatically updating an HTML
element with the results of an HTTP request when given a URL.
Rico: The Rico library also builds on top of the Prototype system. It has support for adding
drag-and-drop behavior to browser DOM elements. It also has some controls to bind
JavaScript objects to DOM elements for manipulating data. Rico has constructs for
revealing and hiding portions of a page using an accordion style. It also has animation,
sizing, and fading effects prebuilt for easier use.
ScriptManager
Script Mangager
Any AJAX library needs a component or a tool that makes some JavaScript code available on
the client. This script code represents the client infrastructure necessary for the library to
work .
AJAX libraries tend to offer a server-side, often parameterless, component that when dropped
on the page automatically outputs any required scripts. This component is generally known
as the AJAX manager or script manager
In addition to ensuring that the proper script is linked to the page, the script manager typically
• Generates proxy code to call remotely into server-side methods and objects,
Partial rendering divides the page into independent regions, each of which controls its own
postbacks and refreshes without causing or requiring a full page update. This is desirable
when only a portion of the page needs to change during a postback.
• Partial updates reduce screen flickering and allows to create more interactive Web
applications
• Partial rendering requires a ScriptManager control in the page. It is essential that the
EnablePartialRendering property on the manager be set to true—which is the default case.
PartialPage
Partial Page Updates-
Updates – Update
Update Panel Control
Panel Control
• The control has a number of properties to control page updates and also exposes a
clientside object model.
• When a control within the UpdatePanel triggers a postback, the UpdatePanel intervenes to
initiate the postback asynchronously and update just that portion of the page.
• At the time the call to the server is made, the name of a JavaScript callback function that
will be called is provided, when the response has been received. That callback function will
receive the results and update various page controls accordingly.
PartialPage
Partial Page Updates-
Updates – Update
Update Panel Control
Panel Control
Partial Page Update is coordinated by the ScriptManager server control and the client
PageRequestManager class.
When partial-page updates are enabled, controls can asynchronously posted to the server.
• With an asynchronous postback, page updates are limited to regions of the page that
are enclosed in UpdatePanel controls and that are marked to be updated.
• The server sends HTML markup for only the affected elements to the browser. In the
browser, the client PageRequestManager class performs Document Object Model
(DOM) manipulation to replace existing HTML with updated markup.
• The UpdatePanel control sends an out-of-band request for fresh markup and then
updates the Document Object Model (DOM) tree when the response is ready.
PartialPage
Partial Page Updates-
Updates – Update
Update Panel Control
Panel Control - Example
-Example
The Example page has two labels and two buttons that can each cause a postback.
It simply updates the two labels with the current server time. Button1 and
its label are placed inside an UpdatePanel. Actually, they are put in the
ContentTemplate of the UpdatePanel.. The other label and button are left
The property settings of the UpdatePanel control determine when a panel's content is updated
during partial-page rendering.
If the UpdateMode property is set to Always, the UpdatePanel control’s content is updated on
every postback that originates from anywhere on the page. This includes asynchronous
postbacks from controls that are inside other UpdatePanel controls, and postbacks from
controls that are not inside UpdatePanel controls.
PartialPage
Partial Page Updates-
Updates – How
How Update
Update Panel
Panel Control
Control is is refreshed?
refreshed?
• When the ChildrenAsTriggers property is set to true and any child control of
the UpdatePanel control causes a postback. Child controls of nested
UpdatePanel controls do not cause an update to the outer UpdatePanel
control unless they are explicitly defined as triggers for the parent panel.
If the ChildrenAsTriggers property is set to false and the UpdateMode property is set
to Always, an exception is thrown. The ChildrenAsTriggers property is intended
to be used only when the UpdateMode property is set to Conditional.
PartialPage
Partial Page Updates-
Updates –Update
Update Panel
Panel Control
Control –Triggering
– Triggering Updates
Updates
A trigger is a binding that specifies which postback control and event cause a panel to update.
When the specified event of the trigger control is raised (for example, a button's Click
event), the update panel is refreshed.
A trigger's control event is optional. If an event is not specified, the trigger event is the
default event of the control. For example, for the Button control, the default event is
the Click event.
UpdatePanels can be nested inside one another. When the outer UpdatePanel is refreshed,
the inner UpdatePanel will also be refreshed.
when the inner UpdatePanel is updated, the outer UpdatePanel is not affected. Even when the
outer UpdatePanel has ChildrenAsTriggers set to true, an asynchronous update of the
inner UpdatePanel will not cause the outer UpdatePanel to be refreshed.
To have controls in a contained UpdatePanel cause a refresh, they have to be set explicitly as
triggers on the outer UpdatePanel.
PartialPage
Partial Page Updates-
Updates –Update
Update Panel
Panel Control
Control –Triggering
– Triggering Updates
Updates Example
- Example
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Refreshing Update Panel through
triggers</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1"
Text="Refresh Panel"
runat="server" />
<asp:ScriptManager ID="ScriptManager1"
runat="server" />
<asp:UpdatePanel ID="UpdatePanel1"
UpdateMode="Conditional"
runat="server">
<Triggers>
<asp:AsyncPostBackTrigger
ControlID="Button1" />
</Triggers>
<ContentTemplate>
<fieldset>
<legend>UpdatePanel content</legend>
<%=DateTime.Now.ToString() %>
</fieldset>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
PartialPage
Partial Page Updates-
Updates –Update
Update Panel
Panel Control
Control with
with User
User Controls
Controls
The ScriptManager control will manage partial-page updates for UpdatePanel controls that are
directly on the ASP.NET Web page or inside a user control on the page.
The user controls inside an update panel will be refreshed when the contents of the update
panel are updated.
It is valid to put an UpdatePanel control inside a user control so that the user control supports
partial-page updates. However, in that case, page developers who add the user control
to a page must explicitly add a ScriptManager control in the host Web page.
PartialPage
Partial Page Updates-
Updates –Update
Update Panel
Panel Control
Control with
with User
User Controls
Controls
The page execution Lifecycle is not altered by the partial rendering feature.
The ScriptManager participates in the lifecycle to facilitate the partial page updates. It
coordinates gathering the renderings from the UpdatePanels that need to be refreshed
during an asynchronous post and carrying the hidden fields necessary to make the
following post function correctly.
Controls that modify the ViewState, even if they are not in the UpdatePanel being affected, do
not have to take any special action to ensure the change is available in subsequent
requests.
Event validation, cross page posting, and ASP.NET’s ability to maintain the scroll position all
continue to work when using the UpdatePanel.
PartialPage
Partial Page Updates-
Updates –TheThe Update
Update Panel
Panel Caution
Cautions and
and Complexities
Complexities
Complex controls that make heavy use of dynamically registered script won’t work correctly
until they are updated to switch from using the ClientScriptManager of ASP.NET 2.0 to
using the ScriptManager included with ASP.NET AJAX.
The ASP.NET Menu and TreeView controls are not fully compatible with the UpdatePanel in
the 1.0 release.
The validation controls also register script in a way that is incompatible with the UpdatePanel.
(Disable the client script for the validator controls and then use them in an
UpdatePanel)
Web Parts
PartialPage
Partial Page Updates-
Updates –TheThe Update
Update Panel
Panel Caution
Cautions and
and Complexities
Complexities
The GridView and DetailsView controls already have a feature for using client callbacks to
paging and sorting. It is not enabled by default, but if the feature is enabled, these
controls cannot be used inside an UpdatePanel.
The FileUpload control also can’t submit files as part of an asynchronous postback
The way the ScriptManager extracts the contents needed for the partial page updates in the
1.0 release, calling Response.Write during the execution of an asynchronous postback
will result in an error
feedback to the user to indicate that the update is being processed. This is
ASP.NET Ajax introduces the TimerControl which performs postbacks at defined intervals.
• Run code on the server every time that a Timer control causes a postback.
• Synchronously post the whole Web page to the Web server at defined intervals.
The Timer control is a server control that embeds a JavaScript component into the Web page.
The JavaScript component initiates the postback from the browser when the interval that is
defined in the Interval property has elapsed.
When a postback was initiated by the Timer control, the Timer control raises the Tick event on
the server. An event handler for the Tick event can be created to perform actions when the
page is posted to the server.
PartialPage
Partial Page Updates-
Updates –Timer
Timer Control
Control
Using TimerControl with UpdatePanel to update the time on a page every five seconds
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Clock</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" ID="SM1" /> <div>
<asp:TimerControl runat="server" ID="Time" Interval="5000" Enabled="true" />
<asp:UpdatePanel runat="server" ID="TimePanel">
<Triggers> <asp:AsyncPostBackTrigger ControlID="Time" EventName="Tick" /> </Triggers>
<ContentTemplate>
<%= DateTime.Now.ToLongTimeString() %>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
ASP.NETAJAX
ASP.NET AJAXClient
Client Library
Library
The AJAX Library brings concepts from the .NET Framework to JavaScript running in the
browser, making the server and client coding models a bit more consistent
The AJAX Library has also added a client-side page lifecycle, similar in concept to the ASP.NET
server-side page lifecycle. This addition makes it easy to participate in the processing of the
page, work with partial page rendering, and provide event handlers for user actions.
ASP.NET AJAX Library establishes a page lifecycle for JavaScript code running in the browser
The Microsoft AJAX Library adds a type system and extensions to JavaScript objects in order to
provide
• Namespaces
• Inheritance
• Interfaces
• Enumerations
• Reflection
The AJAX Library brings classic OOP concepts to JavaScript. It adds namespace support for
grouping functionality. It also provides helpful debugging facilities, a schema for providing
type information, and a means for localizing string and image resources.
ASP.NETAJAX
ASP.NET AJAXClient
Client Library-
Library – Type
Type System:
System Namespaces
: Namespaces
The AJAX Library synthesizes namespaces by creating objects with those names.
Class definitions can be organized logically in just the same way that is organized using C# or
VB.NET.
If separate files are created for different namespaces, it is possible load them conditionally the
same way the Common Language Runtime loads just the assemblies it needs for an
application and does so on demand
ASP.NETAJAX
ASP.NET AJAXClient
Client Library-
Library – Type
Type System:
System Namespaces
: Namespaces
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ASP.NET AJAX Namespaces</title>
<script type="text/javascript">
function pageLoad(sender, args)
{
Type.registerNamespace('Wrox.ASPAJAX');
alert(Type.isNamespace(Wrox.ASPAJAX)); //displays
var namespaces = Type.getRootNamespaces();
var mystr="";
for(var i = 0, length = namespaces.length; i < length; i++)
{
mystr=mystr+"\n"+namespaces[i].getName();
}
alert(mystr); //displays
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server"
ID="scriptManager1" />
<div> </div>
</form>
</body>
</html>
ASP.NETAJAX
ASP.NET AJAXClient
Client Library-
Library – Type
Type System:
System Class
: Class
Classes are reference types. All classes in JavaScript derive from object.
Classes in ASP.NET AJAX helps to create objects and components that derive from base
classes in the Microsoft AJAX Library by using an object-oriented programming model.
Classes can have four kinds of members: fields, properties, methods, and events.
• With properties, the value can be any primitive or reference type and is accessed
by get and set accessor methods. In ASP.NET AJAX, the get and set accessors are
separate functions, which by convention use the prefix "get_" or "set_" in the
function name
ASP.NETAJAX
ASP.NET AJAXClient
Client Library-
Library – Type
Type System:
System Class
: Class
The AJAX Library follows the pattern of declaring a function as the class constructor.
JavaScript allows you to modify the prototype of the function directly, which is how the
AJAX Library creates class members.
The class must then be registered so that it can participate in the semantics of the type
system
• The call to registerClass is on the type being registered. The prototype of the base
type in JavaScript has been modified to add type-system support. Once the type is
registered, an instance of it can be created and its members called.
• The registerClass function actually has three possible parameters: The first one is for
the name of the type, the second is for the base type being extended, and the last is
to specify any interfaces that the class implements.
ASP.NETAJAX
ASP.NET AJAXClient
Client Library
Library -TypeSystem
– Type System: Class
: Class
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ASP.NET AJAX Class</title>
<script type="text/javascript">
function pageLoad(sender, args) {
Type.registerNamespace('Wrox.ASPAJAX.Samples');
Wrox.ASPAJAX.Samples.Album = function(title, artist) {
this._title = title;
this._artist = artist;
}
Wrox.ASPAJAX.Samples.Album.prototype = {
get_title: function () {
return this._title;
},
get_artist: function() {
return this._artist;
}
}
Wrox.ASPAJAX.Samples.Album.registerClass('Wrox.ASPAJAX.Samples');
var anAlbum = new Wrox.ASPAJAX.Samples.Album("Round Room", "Phish ");
alert(anAlbum.get_title());
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager runat="server" ID="sm" />
</div>
</form>
</body>
</html>
ASP.NETAJAX
ASP.NET AJAXClient
Client Library
Library -Type
– Type System:
System Class-Inheritance
: Class - Inheritance
In the prototype model, a derived class has full access to the private members of
the parent class. To be precise, in JavaScript the notion of private members is
not the same as in classic OOP.
ASP.NETAJAX
ASP.NET AJAXClient
Client Library-
Library – Type
Type System:
System Class-Inheritance
: Class - Inheritance
The constructor must explicitly call initializeBase and pass itself, using the this
keyword, along with an array of the arguments to pass to the constructor of the
base type.
The call to initializeBase takes care of producing the final type with inheritance
semantics in place. The base class constructor is called with the arguments
provided.
The type system of the AJAX Library also provides some reflection functions to
explore the relationship between objects.
if (Wrox.ASPAJAX.Samples.TributeAlbum.isInstanceOfType(anotherAlbum) == true)
{ alert("anotherAlbum is a TributeAlbum");}
if (Wrox.ASPAJAX.Samples.TributeAlbum.inheritsFrom(Wrox.ASPAJAX.Samples.Album)
==true )
Interfaces are a convenient way to define standard behaviors that other types can
implement .
An interface is a contract that states that the implementer of the interface must
provide all of the functionality specified in the interface.
The interface itself is only a specification and has no functionality of its own
The function name is the name of the interface. The prototype of the function is
modified to add the interface members.
alert(Wrox.ASPAJAX.Samples.MusicGenre.toString(ge
nre));
alert(genre ==
Wrox.ASPAJAX.Samples.MusicGenre.Industrial);
}
ASP.NETAJAX
ASP.NET AJAXClient
Client Library-
Library – AJAX
AJAXBase
Base Class
Class Library
Library
Microsoft ASP.NET AJAX provides features that helps in creating client script and
integrate it into ASP.NET applications. This includes extensions to existing
ECMAScript (JavaScript) objects to give them the richness of .NET Framework
classes
The AJAX Library takes a familiar set of features from the Base Class Library of
the .NET Framework and brings it to JavaScript in the browser
Extensions to JavaScript base types provide additional functionality for these types.
The core of AJAX development is the ability to make asynchronous web service calls from
JavaScript code.
Major web browsers have included an XMLHttpRequest object for making HTTP requests.
The XMLHttpRequest object is used to perform out-of-band communications with the server for
invoking web services, executing callbacks, and performing partial page updates.
ASP.NET AJAX provides classes for managing web requests, processing responses, and
detecting errors. It also provides support for serializing objects formatted as JSON
(JavaScript Object Notation), which makes them readily usable in JavaScript in the
browser.
Remote Scripting:
• To minimize the impact of page redraws, primitive forms of scripted remote procedure
calls (RPC) appeared around 1997. Microsoft, in particular, pioneered this field with a
technology called Remote Scripting (RS).
• RS employed a Java applet to pull in data from a remote Active Server Pages (ASP)-
based URL. The URL exposed a contracted programming interface through a target
ASP page and serialized data back and forth through plain strings. On the client, a
little JavaScript framework received data and invoked a user-defined callback to
update the user interface via Dynamic HTML or similar techniques. RS worked on both
Internet Explorer 4.0 and Netscape Navigator 4.0 and older versions.
Microsoft replaced the Java applet with a Component Object Model (COM) object named
XMLHttpRequest and released most of the constraints on the programming interface
exposed by the remote URL.
ASP.NETAJAX
ASP.NET AJAXNetworking
Networking-
– XMLHttpRequest
XMLHttpRequest Object
Object
Browsers generally place a new request when an HTML form is submitted either via clientside
script or through a user action such as a button click. When the response is ready, the
browser replaces the old page with the new one
The out-of-band call is triggered via script by an HTML page event and is served by a proxy
component based on the XMLHttpRequest object
The proxy component sends a regular HTTP request and waits, either synchronously or
asynchronously, for it to be fully served. When the response data is ready, the proxy
invokes a user-defined JavaScript callback to refresh any portion of the page that needs
updating.
ASP.NETAJAX
ASP.NET AJAXNetworking
Networking-
– XMLHttpRequest
XMLHttpRequest Object
Object
In Mozilla browsers XMLHttpRequest looks like a native JavaScript object and can be
instantiated through the classic new operator:
When the browser is Internet Explorer, the XMLHttpRequest object is instantiated using the
ActiveXObject wrapper
ASP.NET AJAX Extensions completely encapsulates this object and shields page authors and
application designers from it
ASP.NETAJAX
ASP.NET AJAXNetworking
Networking-
– XMLHttpRequest
XMLHttpRequest Object
Object
The XMLHttpRequest object is designed to perform one key operation: sending an HTTP request.
The request can be sent either synchronously or asynchronously.
interface XMLHttpRequest {
function onreadystatechange;
readonly unsigned short readyState;
void open(string method, string url);
void open(string method, string url, bool async);
void open(string method, string url, bool async, string user);
void open(string method, string url, bool async,
string user, string pswd);
void setRequestHeader(string header, string value);
void send(string data);
void send(Document data);
void abort();
string getAllResponseHeaders();
string getResponseHeader(string header);
string responseText;
Document responseXML;
unsigned short status;
string statusText;
};
ASP.NETAJAX
ASP.NET AJAXNetworking
Networking-
– XMLHttpRequest
XMLHttpRequest Object-Example
Object - Example
(Time.aspx) is a web page that returns the server time to its caller. It takes no
parameters and returns a string .
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Time Page</title>
<script runat="server">
protected override void OnLoad(EventArgs e) {
base.OnLoad(e);
Response.Write("Server Time:"+DateTime.Now.ToUniversalTime());
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
ASP.NETAJAX
ASP.NET AJAXNetworking
Networking-
– XMLHttpRequest
XMLHttpRequest Object-Example
Object - Example
An important part of any type of distributed application is how data is pushed around between
tiers or layers of the application
When tied together with web services, XML and JSON allow for data interchange between
different operating systems and also across the Internet.
ASP.NETAJAX
ASP.NET AJAXNetworking
Networking-
– Data
Data Communication-JSON
Communications - JSON
JSON is the JavaScript Object Notation, and it is a lightweight data interchange format.
JSON's chief advantage over XML is that the data may be parsed fairly easily using JavaScript's
built-in eval() method.
ASP.NET 2.0 AJAX Extensions enables the call to ASP.NET Web services from the browser by
using client script. The page can call server-based methods without a postback and without
refreshing the whole page, because only data is transferred between the browser and the
Web server.
To get a return value or to determine when the request has returned, provide a succeeded
callback function.
The callback function is invoked when the request has finished successfully, and it contains the
return value (if any) from the Web method call.
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Xml;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo =
WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class ServerTime :
System.Web.Services.WebService
{
[WebMethod]
public string GetServerTime()
{
return String.Format("The server time is
{0}.",
DateTime.Now);
}
}
WebServices
Web Servicesand&JavaScript
JavaScript-Example
- Example
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<head id="Head1" runat="server">
<form id="Form1" runat="server">
<style type="text/css">
<asp:ScriptManager runat="server"
body { font: 11pt Trebuchet MS; ID="scriptManager">
font-color: #000000; <Services>
padding-top: 72px; <asp:ServiceReference
text-align: center } path="ServerTime.asmx" />
</Services>
.text { font: 8pt Trebuchet MS } </asp:ScriptManager>
</style> <div>
<title>Simple Web Service</title> <h2>Server Time</h2>
<script type="text/javascript"> <p>Calling a service that returns the
// This function calls the Web Service method. current server time.</p>
function GetServerTime()
{ <input id="EchoButton" type="button"
ServerTime.GetServerTime(OnSucceeded); value="GetTime"
} onclick="GetServerTime()" />
// This is the callback function that </div>
// processes the Web Service return value. </form>
function OnSucceeded(result) <hr/>
{ <div>
var RsltElem = <span id="Results"></span>
document.getElementById("Results"); </div>
RsltElem.innerHTML = result; </body>
} </html>
</script>
</head>
RichAJAX
Rich AJAXToolkit
ToolKit Controls
Controls
The Toolkit is a shared source project with code contributions from developers from Microsoft
and elsewhere.
The Toolkit contains some new controls that have AJAX functionality and a lot of control exten-
ders. The control extenders attach to another control to enhance or “extend” the control’s
functionality .
An extender is basically a server control that emits proper script code—the client behavior—to
enhance how a given ASP.NET control behaves on the client
Server
Server Reference
Reference
Global Namespace
• Contains members and types that extend base ECMAScript (JavaScript) objects and
that provide members that are more familiar to .NET developers. Includes extensions
for the JavaScript Array, Boolean, Error, Number, Object, and String types.
Sys
• Represents the root namespace for the Microsoft AJAX Library, which contains all
fundamental classes and base classes.
Sys.Net
Sys.Serialization
• Contains types related to data serialization for ASP.NET AJAX client applications
Sys.Services
• Contains types that provide client script access in ASP.NET AJAX to ASP.NET
authentication service, profile service, and other application services.
Sys.UI
• Contains types related to user interface (UI), such as controls, events, and UI
properties in the Microsoft AJAX Library.
Sys.WebForms
by Dino Esposito
O'Reilly 2006
www.asp.net/ajax
Questions / Feedback
Thank You!