简体   繁体   English

显示GridView后ASP.NET页面冻结/挂起

[英]ASP.NET Page freezes/hangs after GridView is displayed

I have a GridView which is displaying about 1000 rows. 我有一个GridView显示大约1000行。 Each recordset has only two columns so the loading of the records is not the problem maybe. 每个记录集只有两列,因此记录的加载可能不是问题。

After the GridView has finished the binding and Page_LoadComplete also has finished, the data of the GridView will be displayed on the website. 在GridView完成绑定并且Page_LoadComplete也完成之后,GridView的数据将显示在网站上。

But after the page is displayed for like 2 seconds and i try to scroll down, the website freezes for about 10 seconds. 但是在页面显示大约2秒钟后,我尝试向下滚动,该网站冻结了大约10秒钟。

I think it has to do with the fact that i only display LinkButtons in the GridView. 我认为这与我只在GridView中显示LinkBut​​tons有关。

Is it just the browser which has problems with displaying a huge amount of the buttons or is there any way to solve a problem like this? 仅仅是浏览器在显示大量按钮时有问题,还是有什么方法可以解决这样的问题?

I also tried to display the LinkButtons without a GridView (just a table with rows a column and a hyperlink) and i had the same problem, so it's probably not the GridView I guess. 我也尝试显示不带GridView的LinkBut​​tons(只是一个带有行,列和超链接的表),并且我遇到了同样的问题,所以我猜可能不是GridView。

I hope someone can help me cause i did'nt find any solution so far. 我希望有人能帮助我,因为到目前为止我还没有找到任何解决方案。

Have you considered using Paging concept? 您是否考虑过使用分页概念? It is better to have paging enabled when you have more than 100 rows of data to be displayed on the page. 当页面上要显示100行以上的数据时,最好启用分页。

Having more rows in your grid (even if you have less number of columns) results in browser taking time to render it. 网格中有更多行(即使您的列数较少)也会导致浏览器花费时间来呈现它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM