The application of Ajaxpro in. Net

Source: Internet
Author: User

First, a brief introduction

Ajax (asynchronous JavaScript + XML) applications can send and retrieve only the necessary data to the server, using SOAP or some other xml-based Web service interface, and using JavaScript on the client to handle the response from the server. Because the amount of data exchanged between the server and the browser is much reduced, the result is that we can see applications that respond faster. At the same time, a lot of processing work can be done on the requesting client machine, so the Web server has less processing time.

The advantage of AJAX applications is that:

1. Improved user experience through asynchronous mode

2. Optimizes the transmission between the browser and the server, reduces the unnecessary data round-trip, reduces the bandwidth occupation

3. The Ajax engine runs on the client, taking on a portion of the work that was originally undertaken by the server, thereby reducing the server load under large user capacity.

Second, the configuration

Ajax.NET has AjaxPro.dll and Ajax.dll two versions, these two versions use although similar, but there is a difference, the main difference in the following two points:

(1) Web.config configuration file is not the same

The Ajax.dll configuration file is written as

<add verb= "Post,get" path= "Ajax/*.ashx" type= "Ajax.pagehandlerfactory, Ajax"/>

The AjaxPro.dll configuration file is written as

<add verb= "*" path= "ajaxpro/*.ashx" type= "ajaxpro.ajaxhandlerfactory, Ajaxpro"/>

(2) Call the server method when the way is different, there are many friends for this reason, found that the namespace is not found or the object is not defined

When referencing Ajax.dll, the call server method does not add namespaces.

When applying AjaxPro.dll, calling the server method requires a namespace

For example, when the page is set to this setting

<%@ Page language= "C #" codebehind= "Test.aspx.cs" autoeventwireup= "false" inherits= "Web.test"%>

(3) How the client calls

Ajax.dll for

var response=Test.GetServerMethod();
alert(response.value);

AjaxPro.dll for

var response=Web.Test.GetServerMethod();
alert(response.value);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.