2010年7月27日星期二

Using jQuery in ASP.Net AJAX Applications

http://www.codedigest.com/Articles/ASPNETAJAX/183_Using_JQuery_in_ASPNet_AJAX_Applications_%e2%80%93_Part_1.aspx

we implemented the server side functionality using a separate aspx page and it is called through the AJAX methods available in JQuery.
We made AJAX calls through POST and GET method using JQuery library.

http://www.codedigest.com/Articles/ASPNETAJAX/185_Using_JQuery_in_ASPNet_AJAX_Applications%E2%80%93Part_2.aspx

Server side functionality can be very well implemented through a mere server side function instead of a separate page.

To implement the requirement through PageMethods, we need to define a function in codebehind and decorate it with an attribute called WebMethod. To call this PageMethods from JavaScript, we need to enable the EnablePageMethods property of ScriptManager to true. This will create a JavaScript proxy for all the page methods declared in the page and it will be injected to the client side. We can use JQuery.ajax() method to call the PageMethod from client side.

没有评论:

发表评论