views:

113

answers:

3

I'm strugling to find any decent resources with regards consuming a webservice in an MVC/C# Asp.net App.

Any suggestions?

+2  A: 

http://asp.net/mvc is always a good place to start in general. If you have something more specific, post it here on SO :)

mgroves
I've been using asp.net/mvc for a bit to get to grips with using MVC in asp.net (really simple, quite impressed) and the videos are quite handy. It's more the consumption of the webservice from within the MVC that's difficult to find info on.
Chris M
Duh; I Expect it will just be the same as normal; add to resources and code away.
Chris M
A: 

For working with WebServices, look at http://asp.net/ajax

You use the ScriptManager to point to your web service, then you can call the web methods in about the same manner as you would in C#.

Alternatively you can look at JQuery's ajax method for calling web services. But the Microsoft Ajax ScriptManager is easier to get working with.

Chris Brandsma
+1  A: 

Rick Strahl has an awesome writeup on using JQuery with ASP.NET MVC to make AJAX callbacks to the server. Amongst other things, he covers:

  • Returning and dealing with JSON
  • Using JQuery with ASMX and WCF services
  • Updating client side screens using services and JQuery templates
Thomas Beck