Solved

ASP.NET DataGrid Image does not Refresh after Edit Mode

Posted on 2004-09-13
3
223 Views
Last Modified: 2012-06-21
Thanks to other EE users I was able to add image uploading to my datagrid. However now when it goes back after the edit (new image uploaded) it shows the original image and not the new one unless I hit f5 and refresh the browser.

How can I fix this?

I'm using the following in the PageLoad sub and it calls the database and loads the new info into the datagrid.

If Not IsPostBack Then
    BindDataGrid()
End If
0
Comment
Question by:brian2k1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Expert Comment

by:mantarae
ID: 12043287
After the edit takes place (ie, in your edit_command function), you need to call BindDataGrid() again.   Do not put it in the Page_Load function, otherwise the grid would be rebound before your edit is saved.
0
 
LVL 1

Author Comment

by:brian2k1
ID: 12072014
No. It updates fine. It's the IMAGES being displayed that do not refresh. I guess my question is how can I force the browser to update the images or disable their cache for the page.
0
 
LVL 7

Accepted Solution

by:
mantarae earned 500 total points
ID: 12135563
Oops...misread your question (and was out of town).   Try this:

Launch the Internet Services Manager, navigate to the images directory in question, then right-click the folder, and choose Properties. In the Properties dialog box, select HTTP Headers, and then click Add. Enter the following three headers:

cache-control:no-cache
pragma:no-cache
expires:0

from:
http://www.developerfusion.com/show/228/
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Html fieldset fix its height and width 4 54
CREATE DATABASE 3 43
Validating Date Part2 2 40
Getting robots.txt Error 9 53
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question