以表格或网格格式显示Web服务结果 [英] displaying web service results in table or grid format

查看:67
本文介绍了以表格或网格格式显示Web服务结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我需要以表格或网格格式显示Web服务结果.

请在这方面帮助我.

提前谢谢.

问候.
Kiran ganga

Hi All,

I need to display webservice results in table or grid format.

Please help me in this regard.

Thanks in advance.

Regards.
Kiran ganga

推荐答案

http://forums.asp.net /t/1225734.aspx [ ^ ]

带有AJAX和REST Web服务的.NET Gridview [ http://forums.asp.net/t/1547491.aspx [
http://forums.asp.net/t/1225734.aspx[^]

.NET Gridview with AJAX and REST Web Services[^]

http://forums.asp.net/t/1547491.aspx[^]

Hope this can help you.


您面临的问题是什么.您可以从Web服务获取数据并将其绑定到某些网格.或具有一些自定义控件来显示它.
What is the problem you are facing. You can get data from your webservice and bind it some grid. or have some custom control to show it.


使用提供的少量信息,您可以执行以下操作:

1.在页面上放置一个GridView控件,将ID保留为GridView1
2.确保AutoGenerateColumns属性设置为true
3.假设您要在页面加载时显示结果,请执行以下操作:

Working with the little information you''ve supplied, you can do the following:

1. Place a GridView control on the page, leave the ID as GridView1
2. Make sure the AutoGenerateColumns attribute is set to true
3. Assuming you''re going to display the results when the page loads, do the following:

protected void Page_Load(object sender, EventArgs e)
{
  if(!IsPostBack)
  {
  //webservice results implicitly loaded into variable as it's not part of the question how to get webservice   results
  var results;

    GridView1.DataSource = results;
    GridView1.DataBind();

 }
}


这篇关于以表格或网格格式显示Web服务结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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