Using ASP.NET PageMethods to return JSON to be consumed at the client via jQuery
Posted by: EggHeadCafe.com New Articles,
on 23 Aug 2011 |
View original | Bookmarked: 0 time(s)
The PageMethod is a static method in an ASPX page codebehind that is decorated with the WebMethod attribute. This can be called from external client code via the url "PageName.aspx/MethodName". Using jQuery's $ajax function is probably the easiest way to make these calls,although they can also be called via Microsoft AJAX and by other means.
Here we provide three examples of PageMethods, of increasing complexity, and show how to set up each PageMethod, as well as how to consume and display read more
By Peter Bromberg