Modifying the content attribute of the meta http-equiv Refresh

P

Phil Johnson

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
 
M

Martin Honnen

Phil said:
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.
 

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

Top