Preliminary Research on AJAX

Source: Internet
Author: User
Ajax is the most popular nowadays. It's vanity and vanity that the customer wants to use it.
It also satisfies my curiosity.
After a lot of searching and filtering on the internet, I would like to recommend a better one.
Ajax. Net wrapper. I don't know if my brother has used it in the garden. I will give a brief introduction below.
1 download http://ajax.schwarz-interactive.de/download/
The example is http://ajax.schwarz-interactive.de/download/ajaxsample.zip
2. Install and drop the Ajax. dll under the bin and reference it.
Add
<Configuration>
<System. Web>
<Httphandlers>
<Add verb = "post, get" Path = "ajax/*. ashx" type = "Ajax. pagehandlerfactory, Ajax"/>
</Httphandlers>
...
<System. Web>
</Configuration>
Okay.
3. Add the following in the onload event of the page where it is used: Code Private   Void Page_load ( Object Sender, eventargs E) {< br> Ajax. utility. registertypeforajax ( typeof (INDEX ));
//
}

then write the following function in the other [class that you need to use to return results] [Ajax. ajaxmethod ()]
Public int serversideadd ( int firstnumber, int secondnumber)
{< br> return firstnumber + secondnumber;
}

in the future, the system will create a JavaScript function named serversideadd.
on your page, use
JavaScript to access var S = serversideadd );
alert (S. value);
it seems that this is relatively simple to use, that is, JS requires a higher skill, of course, Ajax is not a JS guru
Haha
here is just a introduction. He can still return dataset. If you are interested, please refer to his example.

Related Article

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.