By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,321 Members | 1,875 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,321 IT Pros & Developers. It's quick & easy.

Refresh current frame

P: n/a
All,

How should we refresh the current aspx frame? I disabled caching using this
command on Page_Load():
Response.Cache.SetCacheability(HttpCacheability.No Cache);
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.
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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!
*************************************************
"Just D." <no@spam.please> wrote in message
news:Mgc1e.855$k57.229@fed1read07...
All,

How should we refresh the current aspx frame? I disabled caching using
this command on Page_Load():
Response.Cache.SetCacheability(HttpCacheability.No Cache);
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.

Nov 19 '05 #2

P: n/a
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.

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
message news:OV**************@TK2MSFTNGP14.phx.gbl...
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!
*************************************************
"Just D." <no@spam.please> wrote in message
news:Mgc1e.855$k57.229@fed1read07...
All,

How should we refresh the current aspx frame? I disabled caching using
this command on Page_Load():
Response.Cache.SetCacheability(HttpCacheability.No Cache);
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.


Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.