HOME
BLOG
SHOPPING
 
CATEGORIES
 
Business Technology
RFID
 
Comms Technology
Telco Data
Digital Convergence
Telco Path To Profitability
Network Technology
IP Layering
Cloud Computing
Convergence
IP Infrastructure
Intro To Voice Over IP
Telecoms Whitepapers
Telecoms Index
WiMax
 
Telco Profiles
New Zealand
Australia
 
Mobile Networks
Mobile Applications
Mobile OS
Mobile Advertising
Mobile Video
 
Media
Digital Interactive Media
Digital Music Downloads
Top10 Video Sharing Sites
Mobile Media Broadcast
Mobile Media Industry
 
Web Technologies
Web 2.0
Web 3.0 Semantic
Web 3 Collaboration
Web 4.0 Quality Content
Web - X
Mashups
SOA - Web Services
VoIP in Business
Web 2.0 Enterprises
 
Virtualization
Intro To Virtualization
Planning
Server Virtualization
Platform Virtualization
App. Virtualization
OS Virtualization
Virtual Desktop [VDI]
Microsoft Hyper-V
VMWare VDI
 
On-Demand / SaaS
About SaaS
Selling SaaS
SaaS Channel Models
SaaS Sales Models
Billing SaaS
 
Electricity
Smart Power
Inductive Power Transfer
 
Electronic Payment
E-Payment Systems
E-Payment Directory
Mobile Payment Systems
 
Other
Personal Technology
Oyco Comms Portals
Convergence Marketing
Home Technology
Car Technology
Boat Technology
 
NEWS UPDATES
Media Technology
Telco Industry Updates
News Index
 
OTHER RESOURCES
Convergence Search
Social Media Podcasts
Events
Sitemap
PROJECT LOGIN
 

AJAX


In September 2005, Microsoft unveiled a new add-on to ASP.NET [Atlas] aimed at leveraging client-side JavaScript, DHTML, and the XMLHttpRequest object.

This would allow developers to create more interactive AJAX-enabled Web applications.

This framework, referred to as:

  • Microsoft® AJAX Library, and
  • ASP.NET 2.0 AJAX Extensions

provides a number of features including:

  • Client-side data binding
  • DHTML animations and behaviors
  • Interception of client POST backs using an UpdatePanel.

 

How Ajax Is Used

Most AJAX features provide the ability to retrieve data from the server asynchronously in a form that is easy to parse and interact with from client-side JavaScript calls. This allows us to call server-side Web services from client-side JavaScript in an ASP.NET 2.0 AJAX Extensions-enabled page.


Calling Web Services with AJAX

Before we look at how AJAX is used to call a web service, let's just recap on using a web service in the Microsoft .NET Framework.

Creating a proxy using the wsel.exe utility or by using the Add Web Reference feature of Visual Studio®.

Invoking a Web service method through a .NET proxy.

The proxy prepares the XML based on the parameters passed

Translates the XML response it receives into the .NET type specified by the proxy method.

AJAX Extensions

The ASP.NET 2.0 AJAX Extensions replicate the exact same sequence of seamless proxy generation for Web services for client-side JavaScript that will run in the browser, i.e.

  • Create an .asmx file hosted on your server
  • Make calls to methods on that service through a client-side JavaScript class

In addition to the standard .asmx Web service attributes, this service attaches ScriptService attribute, making it available to JavaScript clients as well.

If an .asmx file is deployed in an ASP.NET AJAX-Enabled Web application, it can invoke methods of the service from JavaScript by adding a ServiceReference to the ScriptManager control in the .aspx file [this control is added automatically to the default.aspx page when a Web site is created in Visual Studio using the ASP.NET AJAX-enabled Web site template].

Embedding Web SErvice Methods

An alternative to building a complete .asmx file for your Web service methods is to embed the Web service methods directly in the page class.

This avoids having to build a complete Web service endpoint for the methods you want to call. Instead, the Web method can be exposed directly from a web page that is callable from client-side JavaScript by adding a server-side method to the page [either directly in the page or in the codebehind]; and annotating it with the WebMethod attribute.

This will allow it to be invoked via the client-side object PageMethods.

NOTE: these client-side proxies can only be generated from ASP.NET .asmx endpoints, Windows Communication Foundation .svc endpoints, or WebMethods embedded directly in a page, and are not a general mechanism for calling arbitrary Web services.

Back To Top