Image Upload/Display Refresh Problem

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > ASP.NET Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 20th, 2006, 03:45
New Member
Join Date: Jun 2006
Location: texas
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Reply With Quote

  #2 (permalink)  
Old Jun 20th, 2006, 14:08
New Member
Join Date: Jun 2006
Location: texas
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
Reply

Tags
image, uploaddisplay, refresh, problem

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 06:31.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43