This is a discussion on "Image Upload/Display Refresh Problem" within the ASP.NET Forum section. This forum, and the thread "Image Upload/Display Refresh Problem are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Image Upload/Display Refresh Problem
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Image Upload/Display Refresh Problem
Hello,
I have a page on my site which displays an image held in the database (SQL image data type), and immediately below the image, provides a form to upload a new image to replace the current. My goal is that when the upload button is fired, the image will upload and immediately update the image on the page. My problem is, the inital page loads, and when I upload a new image the displayed image immediately changes to reflect the new image, but each subsequent click of the upload button will not refresh the image. I have to actually refresh the page to get the new image to display. After a manual refresh, the first time I change the image (click upload) the image will auto-refresh, but again stop working till a manual refresh... Any clues as to how I can reach my goal would be appreciated. Here's a bit of the code I'm using: The image is displayed on the main page with- <asp:image id="footer1IMG" ImageURL="image.aspx?id=footer1" runat="server" /> The image.aspx file looks like this- sub page_Load <db connection setup> dbconn.Open() dbread=dbcomm.ExecuteReader() Do While (dbread.Read()) response.ContentType = "image/JPEG" response.BinaryWrite(dbread.Item("Image")) Loop end sub The Upload event on the main page looks like this- Sub btnClick(sender as object, e as EventArgs) <set up the IO Stream and read in the byte data> <set up the db connection> <set up a parameterized sql query> <add parameters to the query> connUPL.Open() readUPL=commUPL.ExecuteNonQuery() connUPL.Close() End Sub I even did a response.redirect(page.aspx) at the end of the btnClick routine but it still does the same thing. Thanks again! |
|
|
|
#2
|
|||
|
|||
|
Re: Image Upload/Display Refresh Problem
Update:
I've discovered that this appears to be a Microsoft Internet Explorer caching issue. When I open the site with Firefox I have no problems. I've tried all kinds of response. parameters (response.clear, response.cachecontrol, response.expire...) but none will work in IE. |
![]() |
| Tags |
| image, uploaddisplay, refresh, problem |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Image Upload Problem | kidreapertronV | PHP Forum | 1 | Jan 31st, 2008 18:38 |
| <li> problem :: How to make appear list-style-image while choosing display:inline | sayamish | Web Page Design | 2 | Oct 21st, 2007 05:19 |
| [SOLVED] image display php code problem | longstand | PHP Forum | 7 | Oct 19th, 2007 17:28 |
| Display Image Problem | Matc | JavaScript Forum | 1 | Jun 17th, 2007 23:32 |
| Meta Refresh problem with IE and pop up windows... | PortlandUser | Web Page Design | 0 | Jun 7th, 2006 17:26 |