Refresh current frame

J

Just D.

All,

How should we refresh the current aspx frame? I disabled caching using this
command on Page_Load():
Response.Cache.SetCacheability(HttpCacheability.NoCache);
but it didn't help.

The problem is that this page shows the client Logo image, then asks to
upload a new one if required, finally it should show the uploaded picture.
The problem is that it doesn't. If I press F5, then I can see the updated
image, but if I didn't press F5, then I see the previous image.

The aspx page (frame) has the following code:

<asp:Image id="ImageLogo" style="Z-INDEX: 106; LEFT: 145px; POSITION:
absolute; TOP: 163px" runat="server" ImageUrl="Imager.aspx"
BorderColor="LightBlue" BorderStyle="Solid" BorderWidth="1px"></asp:Image>

When I trace in debugger I see that after uploading the child frame
mentioned in this control (ImageUrl="Imager.aspx") is not calling. When I
press F5 to refresh the frame the child frame is called and refresh the
image.

How can we refresh the frame from C# to renew the image?

Just D.
 
C

Cowboy \(Gregory A. Beamer\)

It is possible that images will cache, when named the same, even if the page
does not cache. It is one of those cute browser quirks. If the image has a
different name, you should not have a problem, unless your code is set to
make certain decisions prior to checking for the newer image.

You can set up the page to automatically refresh, using a meta tag perhaps,
but you still end up with the same issue if the image is being cached.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside the box!
*************************************************
 
J

Just D.

Gregory,

Wow, if this is a "feature" then in this case it's easier to generate the
control name on the fly using the current datetime, maybe it will make the
page cache useless. I think it's possible although takes a few lines of
code.

Thanks for this info, I was thinking that I'm crazy.

Just D.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top