Home All Groups Group Topic Archive Search About
Author
29 Jun 2005 2:46 PM
Mauricio Pires
In my document has an Image and a Buttom WebForm control.
The Buttom's Click event does Image.ImageUrl="Images\Graphic.jpg".
I change the Graphic.Jpg content and click on the Buttom again but the page
show the old file content.
What do I need to do to show the new file content?

Author
29 Jun 2005 9:36 PM
Aaron Corcoran
Mauricio.

That is very odd behavior.  I just set a test site up on my computer
and everything works as suspected.  I put an image control on the page
and a button control as you described.  I set the imageurl property for
the image to be image1.gif.  I then set the click event for the button
to simply say image1.imageurl = "image2.gif", compiled and it
changed the image just fine.

I don't know if you might be experience a framework issue, a browser
caching issue, or something along those lines, but it should be working
as you suspected.

I know this doesn't help too much, but it should at least let you
know that your mind is not playing tricks with you.  Your code should
be correct.

Aaron
Author
29 Jun 2005 10:52 PM
Mauricio Pires
Hi Aaron,

You are sure, but the fact is that you changed the file name and I only
changed the file content so the image isn't update when I click on the buttom.
The fact is that I doesn't want change the file name, because I have a
procedure in my site that change the file content with the same file name.

I hope you can help me yet.
For now, thanks a lot.

Show quoteHide quote
"Aaron Corcoran" wrote:

> Mauricio.
>
> That is very odd behavior.  I just set a test site up on my computer
> and everything works as suspected.  I put an image control on the page
> and a button control as you described.  I set the imageurl property for
> the image to be image1.gif.  I then set the click event for the button
> to simply say image1.imageurl = "image2.gif", compiled and it
> changed the image just fine.
>
> I don't know if you might be experience a framework issue, a browser
> caching issue, or something along those lines, but it should be working
> as you suspected.
>
> I know this doesn't help too much, but it should at least let you
> know that your mind is not playing tricks with you.  Your code should
> be correct.
>
> Aaron
>
>
Author
30 Jun 2005 1:18 PM
Aaron Corcoran
Mauricio,

So what you are doing is simply copying a new image with the same name
into your directory structure, then clicking the button which should
refresh the page and bring up the new image?  I do understand that you
are trying to keep the same name of the image now, so it makes me think
that there might be a possible caching problem on the client.  What you
may wish to do is try to do a response.redirect to the same page, to
see if the image appears after the page is redirected?

Aaron