如何从控制器调用Web服务? [英] How to call a web service from controller?
本文介绍了如何从控制器调用Web服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Jquery从数据库中获取数据。我也在使用Web服务和实体框架。如何从action方法调用Web服务并使用Jquery将它返回的数据传递给视图?
I am using Jquery to fetch data from database. I am using web service and entity framework also. How can I call a web service from action method and pass the data it returns to the view using Jquery?
推荐答案
尝试
将Web服务与MVC结合使用 [ ^ ]
ASP.NET MVC 4 - 通过操作方法对外部服务进行异步调用 [ ^ ]
访问WCF服务在ASP.Net MVC应用程序中 [ ^ ]
Try
Combining Web Services with MVC[^]
ASP.NET MVC 4 - Making Asynchronous Calls to External Services from an Action Method[^]
Accessing a WCF Service in an ASP.Net MVC Application[^]
这篇关于如何从控制器调用Web服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文