如何使用jQuery绑定XML数据. [英] how to bind xml data using jquery.

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

问题描述



我已经开发了Web服务,该服务返回xml字符串数据,但是我想使用jquery将数据关联到listview.你能帮我做到吗?

谢谢,



i have develop web service which return a xml string data but i want to assing that data to listview using jquery. can you please help me to do this?

Thanks,

推荐答案

您不能使用JQuery将数据分配给列表视图. ListView是一个服务器控件,并且JQuery在客户端上运行.

您要么需要在代码隐藏中运行WS,然后将其数据绑定到ListView,要么使用JavaScript来完成它.

如果您可以使用ASP.NET 4.0中的客户端-sdie数据绑定功能,则可以使用

http://msdn.microsoft.com/en-us/magazine/ee309508.aspx [ ^ ]
http://weblogs.asp.net/bleroy/存档/2008/07/30/using-client-templates-part-1.aspx [
You can''t assign the data to a listview with JQuery. ListView is a server control and JQuery is run on the client.

You either need to run the WS in your code-behind and databind to the ListView or do it maunally with JavaScript.

There is some capability with client-sdie databinding in ASP.NET 4.0 if that is avaiable for you

http://msdn.microsoft.com/en-us/magazine/ee309508.aspx[^]
http://weblogs.asp.net/bleroy/archive/2008/07/30/using-client-templates-part-1.aspx[^]


JQuery是针对客户端的,您无法实现这个.寻找任何替代方案
JQuery is for the client side and you cannot acheive this. look for any alternative


这篇关于如何使用jQuery绑定XML数据.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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