从c#调用web服务 [英] call web service from c#

查看:124
本文介绍了从c#调用web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有



我用C创建了一个Web应用程序



在同一个应用程序中,我已经添加了一个Web服务并在那里编写了一些功能。



现在我希望在默认页面上点击按钮调用此功能。



请帮忙...



提前致谢

解决方案

< blockquote>您最好在单独的项目中创建Web服务,然后在Web应用程序中添加对Web服务的引用。



然后在您的Web应用程序中如果要调用Web服务函数,只需包含Web服务命名空间并根据需要调用必要的函数。


Dear All

I have created a Web App in C#

In the same app, I have added a web service and written some function there.

now i wish to call this function on button click in default page.

please help to do so...

Thanks in advance

解决方案

You'd be better creating your web service in a separate project, then adding a reference to the web service in your web app.

Then in your web app where you want to invoke the web service function, simply include the web service namespace and call the necessary function(s) as required.


这篇关于从c#调用web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆