How common usage are Page Methods in ASP.NET 4?
I would like an example of how it’s used (not a code sample).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t know about how common, but check out this example: http://aspalliance.com/1922_PageMethods_In_ASPNET_AJAX.all
Use page methods if you don’t want to publicly expose a web service, and creating a web method that’s specifically only to that page, IMHO. So for instance, I need web service features for one page only, that’s when I create a page method. If I need something reusable in two pages, but don’t want to publically expose it, I create a helper and the web method wraps the helper.
Otherwise, if you are looking to create a dynamic web site and share information, go with a traditional ASMX or WCF service.
HTH.