如何在Asp.Net中的Web服务响应中传递3个参数并接收3个以上的参数? [英] How Could I Pass 3 Parameter And Receive More Than 3 Parameter In Web Service Response In Asp.Net ?

查看:115
本文介绍了如何在Asp.Net中的Web服务响应中传递3个参数并接收3个以上的参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个Web服务,我的目标是在Web服务请求中传递3个参数,我想要7个参数作为响应。所以我想知道我将如何做到这一点..?我是Web服务的新手请帮助并详细说明。

i am creating a web service and my target is to pass 3 parameter in request of web service and i want 7 parameter in response .so i want to know how will i do this..?i am new at web service so please help and elaborate in detail .

推荐答案

使用datacontract这将允许您发送对象。所以对象可以包含任何数量的信息。
Use datacontract this will allow you to send object. So object can contain any amount of information.


经过深入研究后我终于找到了最好的方法: -



只需创建类为您的方法并声明其中的所有值。只需调用该类并将其视为对象,它将按要求工作。
after quite research i finally find the best way:-

just create class for your method and declare all the value in it.Just call the class and treat it as the object and it will work as per requirement.


这篇关于如何在Asp.Net中的Web服务响应中传递3个参数并接收3个以上的参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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