在asp.net gridview中显示记录 [英] show the records in asp.net gridview

查看:90
本文介绍了在asp.net gridview中显示记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有超过50个lac记录我想要显示页面上的记录什么是最好的控件在页面中显示此记录

请帮助我

解决方案

认为自己是该网站的用户。您想一次看到500万条记录吗?没人会。这就是为什么引入分页的概念。

现在选择控件是基于您的要求。 ASP.NET数据绑定Web服务器控件概述 [< a href =http://msdn.microsoft.com/en-IN/library/ms228214%28v=vs.100%29.aspxtarget =_ blanktitle =New Window> ^ ] - 此页面提供了每个控件可以执行的操作的简要概述。根据您的要求从中选择。例如,Repeater控件重量很轻,没有内置布局。您可以从头开始控制UI。



另一个重点是如何从数据库中获取数据 - 一次性完成;每页仅需要数据;如果用户进一步导航,则会有一些记录说1000并再次点击db(注意 - 可以通过获取匹配记录的数量来确定页面数量)。这个决定再次基于您的要求。例如 - 如果我的数据不经常更改,我会随时获得大量记录或全部记录并将其保存到缓存中。如果所有用户的记录都相同,我甚至会将页面缓存一段时间。



所以基本上你需要制定很多设计决策这里。你没有给出太多的细节,所以'这是我能帮到的最好的。但我希望这能让你开始。 :thumbsup:

I have above 50 lac records I want to show that records on page what is the best control show this records in page
please help me

解决方案

Consider yourself a user of the site. Would you like to see 5 million records at a time? No one would. That is why the concept of paging was introduced.
Now choosing the control is based on your requirements. ASP.NET Data-Bound Web Server Controls Overview[^] - this page provides you brief overview of what each control can do. Choose from them based on your requirements. For example Repeater control is very light weight and does not have built-in layout. You can control the UI from the ground up.

Another important point is how you get the data from the database - all at once; only required data for each page; some number of records say 1000 and hit db again if user navigates further (Note - the no. of pages can be decided by getting the count of matching records). This decision is again very much based on your requirements. For example - if my data do not change frequently, I would get a lot of records or all of it at a go and save it into a Cache. If the records are same for all the users, I would even output Cache the page for some time.

So basically there are lot of design decisions that you need to make here. You haven''t given much details so that''s the best I can help. But I hope this shall get you started. :thumbsup:


这篇关于在asp.net gridview中显示记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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