Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Problem: Image Control again showing the same Image

Reply
Thread Tools

Problem: Image Control again showing the same Image

 
 
Sandeep Singh Sekhon
Guest
Posts: n/a
 
      08-02-2006
I am developing an application in ASP.NET 1.1. on one page I allow the
user to upload and delete the files to the server.
When I delete the file, I physically delete the file from the location.
Then I again prompt the user to load a new file but I save the file with
the same name the earlier image file had been saved. The problem is that
when I again upload the page through Response.Redirect after uploading,
it is showing the same image it was showing before deletion whereas in
that location on server, there is another image. How my view of the
image in the Image Control will change when a new picture has come.


Please give me any suggestion. All your suggestion are welcome.

Thanks in advance

Thanks,
Sandeep S. Sekhon
 
Reply With Quote
 
 
 
 
Winista
Guest
Posts: n/a
 
      08-02-2006
Either save the image with different name or append a unique id to image url
for new upload.

ImageUrl="MyImage.jpg?<GUID or something>

"Sandeep Singh Sekhon" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am developing an application in ASP.NET 1.1. on one page I allow the user
>to upload and delete the files to the server.
> When I delete the file, I physically delete the file from the location.
> Then I again prompt the user to load a new file but I save the file with
> the same name the earlier image file had been saved. The problem is that
> when I again upload the page through Response.Redirect after uploading, it
> is showing the same image it was showing before deletion whereas in that
> location on server, there is another image. How my view of the image in
> the Image Control will change when a new picture has come.
>
>
> Please give me any suggestion. All your suggestion are welcome.
>
> Thanks in advance
>
> Thanks,
> Sandeep S. Sekhon



 
Reply With Quote
 
 
 
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      08-03-2006
Hi Sandeep,

If the image file name doesn't change, even the image itself changes, the
browser will use the image from cache. To force the browser use fresh copy,
you can append something to the image url to make the browser think the url
changes.

myImageCtrl1.ImageUrl = "images/test.gif?id="+DateTime.Now.Ticks.ToString();

Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang ((E-Mail Removed), remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      08-07-2006
Hi Sandeep,

I am interested in this issue. Would you mind letting me know the result of
the suggestions? If you need further assistance, feel free to let me know.
I will be more than happy to be of assistance.

Have a great day!

Regards,
Walter Wang ((E-Mail Removed), remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
Reply

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sh Crypto isakmp sa is showing Active but Tunnel is showing line protocol down. urvin Cisco 0 04-15-2008 08:17 AM
ASP 1.1: DataGrid - Showing/Not Showing Buttons Ray Booysen ASP .Net 2 03-28-2006 02:49 PM
Garbage Matter your cliches are showing again BrooksVanPall DVD Video 32 05-21-2004 02:32 AM
Re: Showing my ignorance of VHDL again... Mike Treseler VHDL 3 08-04-2003 02:26 PM
Re: Showing my ignorance of VHDL again... Rienk van der Scheer VHDL 0 08-04-2003 07:40 AM



Advertisments