web服务,返回JSON数据 [英] webservice that returns JSON data
问题描述
我已经分层谷歌搜索,但我以前不得到任何线索,为我自己。
我要让这会不会有什么方法Web服务(让说,ProductInfo)及当我通过
在此方法中包含一个productId这将返回产品的全部信息(如-PRODNAME,ProdPrice等)以JSON格式(文件下载与产品的信息)。
I have tiered of Googling but did't get any clue for myself. I want to make a web service which will have any method (let say-ProductInfo) & when i pass a productId in this method this will return the entire information of Product(like-ProdName,ProdPrice etc) in JSON format(File is downloaded with the Information of product).
我很新....所以,请指导我作为上述初学者。
对于任何一种帮助数以百万计的感谢。
I am very new ....so please guide me as a beginner for the above. for any kind of help Millions of Thanks.
推荐答案
基础上的标签。我猜你使用ASP.NET MVC。但是,你的意思是阶级ASP.NET,那么你可能需要使用WCF的REST返回JSON。
Base on your tag. I guess you use ASP.NET MVC. however, it you mean class ASP.NET then you might need to use WCF-REST to return JSON.
所以:你起点
- ASP.NET MVC - look at JsonResult here >>
- ASP.NET - look at WCF-RESThere >>
或者如果你是很新的,不知道从哪里开始,我建议你 ASP启动.NET MVC 2
Or if you are very new and don't know where to start, I'm recommended you to start at ASP.NET MVC 2
这篇关于web服务,返回JSON数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!