The simplest AJAX callback library in history

Source: Internet
Author: User

First of all, I think of AjaxManager in CS. I just want to simplify it and remove unnecessary and many methods that are more suitable for our habits.
I named him AjaxLite, because he only needs two classes to implement Ajax functions. In order to not Include JS files separately, I embedded JS into the DLL. A total of two files, one JS, one cs file, and two classes. This is the simplest Ajax class library I have ever seen. You just need to reference the compiled DLL file to your project and then Register your user control or page in the Page_Load event. The Code is also very simple and I will not talk about it here.
1. Register: Find the method that contains the AjaxMethod attribute label in the current control and Register it with the client;
2. Post: the method that contains the AjaxMethod attribute label in the client-returned type and callback function lookup control is executed and returned;
3. Render: register to the PreRender in the Page lifecycle, and then Render and execute JS to implement callback.
Http://xiazai.jb51.net/200810/yuanma/AjaxLite.zip

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.