473,795 Members | 3,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\MYPI C.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 3002
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******** ********@TK2MSF TNGP10.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(Date Time.Now.AddTic ks(500))

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
3239
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> ..... <PICTURES number=3 encoded=0> //0 is for plain jpg, 1 is for CDATA Base64 string <PIC name=pic1344_1.jpg number=1>
1
10156
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 the same... 1) browse for 1st image. 2) image path and file name appears in text box i.e. IMAGE1.JPG 3) browse for 2nd image.
2
2546
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. So when the page first loads I'd like the image url to be "img1.gif"; then 20 seconds later "img2.gif"; then "img3.gif", and so on. All this should take place dynamically without refreshing the page. Any help would be appreciated.
4
1432
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 his browser would receive picture with some good looking name, like image1.jpg. How to do this within ASP.NET code ?.. -- Pawe³
10
10727
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 return the combined tif image object. Thnks in advance Rinu G P
2
1340
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 button but when I refresh the page Image as well as Text is dispalyed as I wanted. So why It is displaying after refreshing the page
10
1671
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" BorderColor="DimGray" BorderStyle="Solid" BorderWidth="1px" Height="120px" ImageUrl='<%# "~/Images/ClassmatePics/" & Eval("GradPhotoFileName") %>' ToolTip="Click to enlarge" /></td> "GradPhotoFileName" is stored in a field in a table. If the file...
8
1483
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 code with a variable which resolves to the first word in the page's file name? e.g. document.getElementById('MyDiv').innerHTML = "<iframe src='Animal_Page1.htm'></iframe>";
0
1029
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 ".Xls" alone.Full file name is not reflected in list pages.
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10001
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3723
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.