简体   繁体   中英

How to speed up Dropdownlist SelectedIndexChanged event

I am binding a gridview on a Dropdownlist_SelectedIndexChanged event, but I find this process to be too slow. It is taking 50-60 seconds to populate, while the amount of data i'm displaying is not bulky. (max 40 rows). How to speed up selectedindexchanged performance?

Are you binding the grid view every time depend upon selectedIndex?if it is the case, may be because of sql transaction page is slow,
you can save your data-table in session or view state and filter this data-table based upon the selected index. this will stop the hit to sql server.
on other way you can use ajax to get data-table ,this will prevent your full page post back.

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