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