GridView的数据绑定需要20秒加载140记录在ASP.Net [英] Gridview databind takes 20 seconds to load 140 records in ASP.Net

查看:182
本文介绍了GridView的数据绑定需要20秒加载140记录在ASP.Net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有在显示在ASP.Net应用程序的gridview的问题。此加载缓慢,几乎需要20秒加载140的记录。使用IE浏览器时,这就变得很慢。

I am having issues in displaying the gridview in ASP.Net application. This loads slowly and almost takes 20 seconds to load 140 records. This becomes really slow when using IE browser.

我有一个模式弹出扩展中的一列,它看起来是装载控制每个网格刷新时间和所有行。

I have a modal popup extender in one of the columns and it looks like it is loading that control every time the grid refreshes and for all rows.

现在我在做寻呼非常久远的一个选项,以查看所有记录。用户在这里想查看
所有记录的大部分时间。所以,我需要提高加载gridview的速度。请让我知道,如果有使用与来自AJAX扩展其他模式弹出窗口的任何其他方式。

Right now I am doing paging alongwith an option to view all records. Users here wanted to view all records most of the time. So I need to improve the speed of loading the gridview. Please let me know if there is any other way of using modal popup window other than extender from AJAX.

我使用模式弹出窗口,让用户输入与该特定行一些意见。

I am using modal popup window to allow the user to enter some comments related to that particular row.

在此先感谢
阿尼尔

Thanks in advance Anil

推荐答案

您必须找到一种方法,只使用一个ModalPopupExtender,而不是一个为每一行。 ID确实呈现在modalpopup'content每一行的所有控件,这是正常的,你的页面加载速度很慢!

You must find a way to use only one ModalPopupExtender, not one for each row. Id does render all the controls in the modalpopup'content for each row, it's normal that you page loading is slow!

这样做的一种方法是把一个更新面板中的ModalPopup里面,初始化它的内容在GridView的RowCommand事件(你可以存储在这一点上一个会话变量或HiddenField行/数据库ID)并显示从code弹出的背后(<一个href=\"http://blogs.blackmarble.co.uk/blogs/rfennell/archive/2008/09/02/controlling-a-ajax-control-modalpopupextender-from-$c$c-behind.aspx\"相对=nofollow>您可能需要使用一个男儿本色按钮)

One way of doing this is to put an update panel inside the ModalPopup, initialize it's contents in the RowCommand event of the gridview (you could store the row/database id in a session variable or HiddenField at this point) and show the pop-up from code behind (You may need to use a invisible target button)

这篇关于GridView的数据绑定需要20秒加载140记录在ASP.Net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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