如何使用json webservice中的参数并检索json数据 [英] how to use parameter from json webservice and retrieve json data

查看:472
本文介绍了如何使用json webservice中的参数并检索json数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android新手。我在asp.net中创建了json webservice ..有一个参数和数据列表..然后我在android中使用json webservice来获取listview中的数据...但我想通过使用参数获取数据列表。如果我给了Id号。列表视图中显示的那个特定id的数据列表没有....请帮助我..提前谢谢..

Am New To Android. I Created json webservice in asp.net ..having one parameter and list of datas.. then am using that json webservice in android to get datas in listview...but i want to get list of datas by using parameters. for ex.. if i give Id No. The list of datas displayed in listview for that particular id no....please help me ..thanks in advance..

推荐答案

查看两个链接



准备一个JSON Web服务并使用JQuery访问它 [ ^ ]

http://www.devtechie.com/post/ 2011/05/26 / Insert-Data-using-JSON-ASPNET-Web-services-and-jQuery.aspx [ ^ ]



查看列表vaues,请参阅

演示代码

See the both of links

Prepare a JSON Web Service and access it with JQuery[^]
http://www.devtechie.com/post/2011/05/26/Insert-Data-using-JSON-ASPNET-Web-services-and-jQuery.aspx[^]

For viewing List vaues see the
Demo Code


(document).ready(function(){
(document).ready(function () {


.ajax({
url:http:/ / localhost:49493 / GetValues,
类型:获取,
成功:函数(数据){
for(var i = 0;我< data.length; i ++){
.ajax({ url: "http://localhost:49493/GetValues", type: "Get", success: function (data) { for (var i = 0; i < data.length; i++) {


这篇关于如何使用json webservice中的参数并检索json数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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