Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In ASP.NET Web Forms if you want to use jQuery and call a method directly, you should either implement a web service, or use Page Methods. Also you can use Generic Handlers (.ashx files).

However, in ASP.NET MVC, a controller action (a method in nature) can be called directly from jQuery.

What web services has to offer in ASP.NET MVC world? In other words, seems that I can fulfill of my requirements via MVC's clean URLs, controllers and actions. Should I bother using Web Services?

share|improve this question

1 Answer 1

I think you got it all wrong regarding Web Services... Your page methods analogy is correct, but web services is a whole other ball game.

Here is a small, yet to the point, explanation on why use web services:

http://www.w3schools.com/webservices/ws_why.asp

Wikipedia's definition for Web Services also gives you an insight into why they are used.

There are many reasons, but the main one, I would say, is interoperability.

But, yeah, if all you used web services for was to use jQuery to call a method directly, then you probably shouldn't use web services...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.