D
dba56
In an ASP.Net 2.0 page using SQL Server 2K, I have a editable gridview
that is bound to a SQLDataSource using stored procedures for its select
and update queries. The grid works fine but is slow due to rebinding
on postbacks when the edit, save or cancel buttons are clicked. So I
set "enablecache = True" for the SQLDataSource and it is much,much
faster. Clicking on edit or cancel (when in edit mode) refreshes the
grid much faster. But the problem I can't seem to solve is after
editing a row and saving it, the cache does not get updated and the
grid shows the old value from the cache. Instead of using the
enablecache property, I was thinking of saving the data to the cache
manually and rebinding only when the save button is clicked. I used to
do this by saving the dataset to cache. But I don't see a way to save
the results of a SQLDataSource "select" into a cache. Is a dataset even
generated? Is there some way to refresh the cache when the save button
is clicked without using the SQL dependency feature, which I would not
rather use at this point? I don't know if the SQL dependency feature
would update the cache that quickly anyway. Any suggestions would be
greatly appreciated. Thanks in advance for any help.
that is bound to a SQLDataSource using stored procedures for its select
and update queries. The grid works fine but is slow due to rebinding
on postbacks when the edit, save or cancel buttons are clicked. So I
set "enablecache = True" for the SQLDataSource and it is much,much
faster. Clicking on edit or cancel (when in edit mode) refreshes the
grid much faster. But the problem I can't seem to solve is after
editing a row and saving it, the cache does not get updated and the
grid shows the old value from the cache. Instead of using the
enablecache property, I was thinking of saving the data to the cache
manually and rebinding only when the save button is clicked. I used to
do this by saving the dataset to cache. But I don't see a way to save
the results of a SQLDataSource "select" into a cache. Is a dataset even
generated? Is there some way to refresh the cache when the save button
is clicked without using the SQL dependency feature, which I would not
rather use at this point? I don't know if the SQL dependency feature
would update the cache that quickly anyway. Any suggestions would be
greatly appreciated. Thanks in advance for any help.