473,401 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

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 7941
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
2
by: Eshrath | last post by:
Hi, What I am trying to do: ======================= I need to form a table in html using the xsl but the table that is formed is quite long and cannot be viewed in our application. So we are...
40
by: Harlan Messinger | last post by:
Why would anyone ever have expected a content-type META tag to be effective at all? Is it because someone was misled by the happenstance the letters of the alphabet, the digits, and the characters...
4
by: Mike [MCP VB] | last post by:
Hi, I hope this is the right place to ask. I have an xml file thus: <?xml version="1.0" encoding="UTF-8"?> <Message xmlns="urn:myurl-org:ns2"...
64
by: Manfred Kooistra | last post by:
I am building a website with identical content in four different languages. On a first visit, the search engine determines the language of the content by the IP address of the visitor. What the...
4
by: Karine Bosch | last post by:
Hi, My xml document uses different namespaces: <x:root xmlns:x="x:ns:meta/"> <element1 xmlns:adam="http://ns.alfaprint.be/"> </root> This gives problems when using an XPath query. I...
2
by: rk | last post by:
I have the following library.xml file coming from a system, this can't be modified. ____________________________________________________________________________ <?xml version="1.0"...
1
by: Martin Mücke | last post by:
I got a website consisting of about 150 php pages. The site uses a frameless table based design. Header and menu are always the same and therefore should be extracted. At the moment I got a...
4
by: bashetty | last post by:
Well its a strange problem i have, some of you might already faced it and have a solution. I have to maintain a set of unique "search key words" in meta tags for each content page in my site. With...
5
by: IUnknown | last post by:
Ok, we are all aware of the situation where modifying the folder structure (adding files, folders, deleting files, etc) will result in ASP.NET triggering a recompilation/restart of the application....
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.