473,395 Members | 1,558 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Refreshing an Image on a VB.NET Web Page - modified w/ same file name

I've written a VB.NET Web application that allows a user to upload a
picture. Once the file has been uploaded, I have an editing process that
allows the user to rotate the image 90 degrees clockwise or
counter-clockwise. The file is converted, saved with the SAME name it had
originally and should be re-displayed with the corrections.

The image is indeed being modified. The problem that I have is that the
original image must be "cached" in memory somehow when its referenced as a
URL since my image display of the image doesn't change. If I click "reload"
I do see the corrected image.

Also - I made a button that changes the images URL to another file and it
works fine - then when I click another button that I made to change it back
I get the "cached" image again.

In the "lab" when I was writing this I had no problem at all when I read the
file from a location on the hard drive "C:\MYFILE\MYPIC.JPG". Now that it
is loaded as a URL I'm having this problem.

Does have any ideas?

Is there a way to force the page to reload - perhaps that's the best
solution?

Thanks,

Fred
Nov 21 '05 #1
4 2985
Fred,

When I understood you right, than you can see your solution it in the sample
I once made what is with the latest changed I thought in this message.

http://groups-beta.google.com/group/...4673daa5bc4f86

I hope this helps,

Cor
Nov 21 '05 #2
Hi Cor:

Thanks for your help!

Actually all that I need to do now to get my system working is to find if
there is a way to call a page refresh as if the user clicked the reload
button. The image files are saved on disk and referenced by a URL

image1.url = "http://weblocation/pic1.jpg

When I make a change to pic1.jpg it does not show up on my page as the
server has obviously cached the prior version of pic1.jpg in memory.
Clicking reload fixes it as does stopping & restarting the development
environment and returning to the page.

So I guess I need a page-reload method - or at least an image1.refresh
method.

Thanks,

Fred
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Fred,

When I understood you right, than you can see your solution it in the sample I once made what is with the latest changed I thought in this message.

http://groups-beta.google.com/group/...4673daa5bc4f86
I hope this helps,

Cor

Nov 21 '05 #3
Fred,

I am not sure of your question, however when you do this for real than you
would have to use in my opinion a GUID for the filename, otherwise another
user would overwrite direct the picture you made (and a clean up method).

Another point is that the browser does not refresh an image with the same
name.
As you wrote, it keeps it in cache. To prevent that you can use something as
this.

Response.Cache.SetExpires(DateTime.Now.AddTicks(50 0))

I hope this helps?

Cor
Nov 21 '05 #4
doh,
I am not sure of your question

busy with the question I became sure because I recognised the problem,

:-)

Cor
Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bob Bedford | last post by:
I've some XML files used to update my datas in my database/server. I've got how to retrieve all datas between xml tags, but I'm stuck when I've to retrieve images datas: <DATAS> ........
1
by: JonChart | last post by:
Hi all, I would like to know ho to validate a file name when uploading via asp and whether or not this can be validated with javascript? I need to upload 2 images and the file names must be...
2
by: jdi | last post by:
Hello, I have a seemingly basic question about ASP.NET. I would like to create a page containing an image, which keeps swapping the url of the image source, without refreshing the entire page. ...
4
by: pawel | last post by:
Hi! I have an .aspx page which returns an image. This page takes some GET parameters, so URL looks like this: http://localhost/page.aspx?id=1234 Now, when the user click this link, I want that...
10
by: =?Utf-8?B?UmludSBHb3BhbGFrcmlzaG5hIFBpbGxhaQ==?= | last post by:
Hi, Please help me to write a dll in C# , that will read each pages of a tiff image from a file and a memory stream object ( need two ways) and creatre a new tiff image object.The dll should...
2
by: mukeshrasm | last post by:
Hi I am printing some text on image dynamically. I am setting the font size and type dynamically and then displaying to other page. Thing is that it is not displaying the image when I click submit...
10
by: Keith G Hicks | last post by:
I'm hoping there's a simple way to do this. I need to show a dummy image in an asp image object if the file is missing. Here's my asp.net 2.0 markup: <asp:Image ID="imgGrad" runat="server"...
8
by: tur130 | last post by:
The following code is in a file called Dog_features.htm document.getElementById('MyDiv').innerHTML = "<iframe src='Dog_Page1.htm'></iframe>"; Is there a way to replace the word Dog in the...
0
by: sivanandam M | last post by:
Can any one suggest me the problem for the issue given below, 1.I have uploaded a file in a page with file name "Test.xls." 2.After uploading the file,in list page the file name is displayed as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.