在ASP.NET中使用Web服务 [英] Consuming Web service in ASP.NET
本文介绍了在ASP.NET中使用Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在C#中的ASP.NET页面中调用Web服务?
How to call web service in ASP.NET pages in C#?
Please show some example and code also?
推荐答案
看看这些文章,您将了解全部:
您的第一个C#Web服务 [在ASP.NET教程中使用Web服务 [
Well have a look at these articles, you will know all:
Your first C# Web Service[^]
Consuming a Web Service in ASP.NET Tutorial[^]
您可以添加Web引用,然后键入URL链接(服务).. :)
范例:
You can Add Web Reference and then type your url link (service).. :)
Example :
using WebReference;
public void UserService()
{
int a = 8;
int b = 10;
Service oSrvc = new Service();
oSrvc.AddMethod(8, 10); // AddMethod is the method from your service (sample)
}
希望这段代码对您有帮助..)
I hope, this code can help u.. ;)
这篇关于在ASP.NET中使用Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文