I am using GridView to display 2 Lacs data in asp.net but it is not displaying and hanging up.
Appreciate your help on this.
I am using GridView to display 2 Lacs data in asp.net but it is not displaying and hanging up.
Appreciate your help on this.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Hiralal SinghPosted Mar 23, 2023, 9:38 AM
Thanks for reply @Naimish Makwana but I'm unable to display record as it.
Naimish MakwanaPosted Mar 23, 2023, 3:58 AM
Hello Hiralal,
Few suggestions for optimization:
Use paging: Use the built-in paging functionality of the GridView to display only a subset of records at a time. This will reduce the amount of data that needs to be loaded and displayed on the page.
Enable ViewState: Enabling ViewState can help improve the performance of the GridView by reducing the amount of data that needs to be transferred between the server and the client.
Use caching: Cache the data that is being displayed in the GridView so that it can be retrieved quickly from memory instead of being retrieved from the database every time the page is loaded.
Use AJAX: Use AJAX to load the data asynchronously, so that the page does not hang up while the data is being loaded.
Optimize database queries: Optimize the database queries that are being used to retrieve the data. Make sure that the queries are optimized for performance and are using appropriate indexes.
Use server-side processing: Use server-side processing to filter and sort the data, instead of doing it on the client-side. This will reduce the amount of data that needs to be transferred between the server and the client.
Thanks
Naimish Makwana
Jignesh KumarPosted Mar 23, 2023, 3:49 AM
Hi Hiral,
It's always good practice to do lazy loading. You can achieve implementing paging.
Lazy Loading: Use lazy loading to avoid loading all the data at once, and instead load data on demand as the user scrolls down the page.
https://www.c-sharpcorner.com/UploadFile/rohatash/gridview-paging-sample-in-Asp-Net/
https://www.c-sharpcorner.com/UploadFile/9b86d4/how-to-implement-paging-in-gridview-control-in-Asp-Net/