ASP.Net:将数据集绑定到集合 [英] ASP.Net: Binding a dataset to a collection

查看:103
本文介绍了ASP.Net:将数据集绑定到集合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,

谁能告诉我,这更快:

1.从对象层获取数据集并绑定到网格.
2.将数据集转换为集合并绑定到网格.

谁能提供到这样一个示例的链接(将数据集转换为集合以及如何将其绑定到网格)?

在此先感谢

Hello Friends,

Can anyone tell me, which is faster:

1. Getting a dataset from Object Layer and binding to a grid.
2. Converting a dataset to a collection and binding to a grid.

Can anyone provide a link to such an example (Converting dataset to collection and how to bind it to grid)?

Thanks in advance

推荐答案

您可以将具有表的数据集绑定到网格,如

You can bind dataset having table to grid like

GridView1.DataSource=<dataset_obj>.Tables[Index];
GridView1.DataBind();</dataset_obj>


第一个会更快.
谢谢.
first one will work faster.
Thanks.


这篇关于ASP.Net:将数据集绑定到集合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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