简体   繁体   中英

ASP.NET Page freezes/hangs after GridView is displayed

I have a GridView which is displaying about 1000 rows. 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.

But after the page is displayed for like 2 seconds and i try to scroll down, the website freezes for about 10 seconds.

I think it has to do with the fact that i only display LinkButtons in the GridView.

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.

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.

Having more rows in your grid (even if you have less number of columns) results in browser taking time to render it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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