Browser Caching Problem

G

Guest

I am currently experiencing a problem whereby browser caching seems to be
causing my page to be invalid.

I am using a standard DataGrid WebControl which is bound to a DataView
object. I use a link in the DataGrid control to go to a details page for the
record to edit a number of different fields for the record. After updating
the dataset and database, I use a response.redirect (I’ve also tried
Server.Transfer) to return to the first page with the DataGrid. The problem
is that the DataGrid does not reflect the changes I’ve made to the database.
If I step the page load procedure in debug mode, the DataGrid does update and
I see the new data. If I don’t, I don’t see the new data until I hit the
refresh button or click on the link to go to the page directly.

I’ve tried to use the HTML metatags ‘<meta http-equiv="Pragma"
content="no-cache">’ and ‘<meta http-equiv="expires" content="0">’ but they
don’t seem to work. I have the same problem if I’m using IE or Firefox.
I’ve also tried to use ‘OutPutCache Location=â€noneâ€â€™ (which as I don’t think
is related) with no success.

Any help, ideas, comments, suggestions would be appreciated.
 
C

Collin Chung

Hi Jonathan,

Right now, I can think of one old school way of dealing with browser
(and even proxy) caching, which is to append the url with a random
query string to make it look unique to the browser, eg.

Response.Redirect("grid.aspx?K12dU33jb1kjj22")

Collin Chung
 
G

Guest

An Update since yesterday...

I've set some values in the PageLoad procedure and found that even though
the datgrid does not refresh, the values in the page load procedure do. So,
for example, I create an HTML comment with the current date/time the FormLoad
procedure ran and that is updated every time as expected. But the datagrid
is seems to be the only part being cached.
 
G

Guest

I did try that and it still has the same problem. The datagrid information
does not appear to change even though the rest of the page is updating.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top