469,900 Members | 1,513 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,900 developers. It's quick & easy.

Modifying the content attribute of the meta http-equiv Refresh

Hello,

I have an ASP.NET 2.0 application with the following meta tag to refresh the
page after a minute.

<meta http-equiv="Refresh" content="60; URL=Default.aspx" />

I need to be able to set the time to refresh dynamically though (i.e. if I
have more data, or at peak times I want to refresh every 30 seconds).

Does anybody know a good example of this, or can you point me in the
direction of how I can do it?

Thanks

--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
Jan 27 '08 #1
2 7565
Phil Johnson wrote:
I have an ASP.NET 2.0 application with the following meta tag to refresh the
page after a minute.

<meta http-equiv="Refresh" content="60; URL=Default.aspx" />

I need to be able to set the time to refresh dynamically though (i.e. if I
have more data, or at peak times I want to refresh every 30 seconds).

Does anybody know a good example of this, or can you point me in the
direction of how I can do it?
Well with ASP.NET you can manipulate HTTP response headers directly, no
need to use a meta http-equiv.
So try
Page.Response.AppendHeader("Refresh", "30; URL=Default.aspx");
before you page sends any content.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Jan 27 '08 #2
Thanks for that Martin, it works a treat.

--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
"Martin Honnen" wrote:
Phil Johnson wrote:
I have an ASP.NET 2.0 application with the following meta tag to refresh the
page after a minute.

<meta http-equiv="Refresh" content="60; URL=Default.aspx" />

I need to be able to set the time to refresh dynamically though (i.e. if I
have more data, or at peak times I want to refresh every 30 seconds).

Does anybody know a good example of this, or can you point me in the
direction of how I can do it?

Well with ASP.NET you can manipulate HTTP response headers directly, no
need to use a meta http-equiv.
So try
Page.Response.AppendHeader("Refresh", "30; URL=Default.aspx");
before you page sends any content.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Jan 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

40 posts views Thread by Harlan Messinger | last post: by
4 posts views Thread by Mike [MCP VB] | last post: by
64 posts views Thread by Manfred Kooistra | last post: by
4 posts views Thread by Karine Bosch | last post: by
1 post views Thread by Martin Mücke | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.