473,416 Members | 1,546 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,416 software developers and data experts.

Dynamic Refresh using meta tags????

Can someone please tell me why the following dynamic refresh doesn't work!

Thanks

Inline code...
<!----- dynamically filled META REFRESH element ----->
<meta id="mtaRefresh" runat="server" />
...CodeBehind
Protected WithEvents mtaRefresh As
System.Web.UI.HtmlControls.HtmlGenericControl
' use META REFRESH to start loading next page
mtaRefresh.Attributes.Add("http-equiv", "refresh")
mtaRefresh.Attributes.Add("content", "0;url=" & sRefreshURL)
Nov 19 '05 #1
4 3057
Start by checking the HTML code using "view source" to find out if this is
a problem with creating the HTML server side or how the browser behaves
client-side. If the HTML looks good try a non zero value...

Patrice

--

"Tim::.." <myatix_at_hotmail.com> a écrit dans le message de
news:22**********************************@microsof t.com...
Can someone please tell me why the following dynamic refresh doesn't work!

Thanks

Inline code...
<!----- dynamically filled META REFRESH element ----->
<meta id="mtaRefresh" runat="server" />
..CodeBehind
Protected WithEvents mtaRefresh As
System.Web.UI.HtmlControls.HtmlGenericControl
' use META REFRESH to start loading next page
mtaRefresh.Attributes.Add("http-equiv", "refresh")
mtaRefresh.Attributes.Add("content", "0;url=" & sRefreshURL)

Nov 19 '05 #2
I think I'm using the wrong namespace but I'm not sure what it should be! I
would be grateful for any advice!

I checked the HTML source and the code isn't generated!

Can someone please help!

Inlinecode...
<!----- dynamically filled META REFRESH element ----->
<meta id="mtaRefresh" runat="server" />

Codebehind...
Protected WithEvents mtaRefresh As
System.Web.UI.HtmlControls.HtmlGenericControl

mtaRefresh.Attributes.Add("http-equiv", "refresh")
mtaRefresh.Attributes.Add("content", "0;url=" & sRefreshURL)
Thank you!


Protected WithEvents tagBody As System.Web.UI.HtmlControls.HtmlGenericControl

"Patrice" wrote:
Start by checking the HTML code using "view source" to find out if this is
a problem with creating the HTML server side or how the browser behaves
client-side. If the HTML looks good try a non zero value...

Patrice

--

"Tim::.." <myatix_at_hotmail.com> a écrit dans le message de
news:22**********************************@microsof t.com...
Can someone please tell me why the following dynamic refresh doesn't work!

Thanks

Inline code...
<!----- dynamically filled META REFRESH element ----->
<meta id="mtaRefresh" runat="server" />
..CodeBehind
Protected WithEvents mtaRefresh As
System.Web.UI.HtmlControls.HtmlGenericControl
' use META REFRESH to start loading next page
mtaRefresh.Attributes.Add("http-equiv", "refresh")
mtaRefresh.Attributes.Add("content", "0;url=" & sRefreshURL)


Nov 19 '05 #3

"Tim::.." <myatix_at_hotmail.com> wrote in message
news:22**********************************@microsof t.com...
Can someone please tell me why the following dynamic refresh doesn't work!

Thanks

Inline code...
<!----- dynamically filled META REFRESH element ----->
<meta id="mtaRefresh" runat="server" />
..CodeBehind
Protected WithEvents mtaRefresh As
System.Web.UI.HtmlControls.HtmlGenericControl
' use META REFRESH to start loading next page
mtaRefresh.Attributes.Add("http-equiv", "refresh")
mtaRefresh.Attributes.Add("content", "0;url=" & sRefreshURL)


I may be wrong, but I didn't think you can use runat with a meta tag. What I
do is create a placeholder and place literal or load static controls in the
placeholder as follows.

Adding literal
plc1.controls.clear
plc1.controls.add(New Literalcontrol("<meta name=" & chr(34) & "my meta
string" & chr(34) & " content=" & chr(34) & "content text" & chr(34) & ">"))

or if you have several fixed meta controls that you can add depending on
criteria.
plc1.controls.clear
dim ctl as control = loadcontrol("inc/metatag123.ascx")
plc1.controls.add(ctl)

Hope this helps.
Mike


Nov 19 '05 #4
Tim,

another way of accomplishing this, is using javascript, generated serverside.
Now I didn't test this actual line of code but I've used it before

Page.RegisterStartUpScript("Refresh", myScript)

where myScript contains:
string myScript = "window.SetInterval(document.location.reload,
some_variable_containing_milliseconds)"
"Tim::.." wrote:
I think I'm using the wrong namespace but I'm not sure what it should be! I
would be grateful for any advice!

I checked the HTML source and the code isn't generated!

Can someone please help!

Inlinecode...
<!----- dynamically filled META REFRESH element ----->
<meta id="mtaRefresh" runat="server" />

Codebehind...
Protected WithEvents mtaRefresh As
System.Web.UI.HtmlControls.HtmlGenericControl

mtaRefresh.Attributes.Add("http-equiv", "refresh")
mtaRefresh.Attributes.Add("content", "0;url=" & sRefreshURL)
Thank you!


Protected WithEvents tagBody As System.Web.UI.HtmlControls.HtmlGenericControl

"Patrice" wrote:
Start by checking the HTML code using "view source" to find out if this is
a problem with creating the HTML server side or how the browser behaves
client-side. If the HTML looks good try a non zero value...

Patrice

--

"Tim::.." <myatix_at_hotmail.com> a écrit dans le message de
news:22**********************************@microsof t.com...
Can someone please tell me why the following dynamic refresh doesn't work!

Thanks

Inline code...
<!----- dynamically filled META REFRESH element ----->
<meta id="mtaRefresh" runat="server" />
..CodeBehind
Protected WithEvents mtaRefresh As
System.Web.UI.HtmlControls.HtmlGenericControl
' use META REFRESH to start loading next page
mtaRefresh.Attributes.Add("http-equiv", "refresh")
mtaRefresh.Attributes.Add("content", "0;url=" & sRefreshURL)


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Will Appleby | last post by:
I'm trying to create a web page that will refresh each time someone visits so they always see an updated version. I've tried using <META HTTP-EQUIV="refresh" CONTENT=";URL=index.html"> in the...
4
by: Daniel Keller | last post by:
Hello! I'm trying to set up a page system using "dynamic" SSI. That means that I normally use the following on my website: <!--#include virtual="file.inc" --> Now I want to make this...
1
by: Tom Frantz | last post by:
I have a META tag coded as follows: <META HTTP-EQUIV="refresh" CONTENT="60;URL=http://www.mydomain.com/myPage.html" id="refreshMeta"> This of course causes the page to automatically refresh...
4
by: Jim Hammond | last post by:
After much effort, it doesn't seem possible to redirect the user to a new page after 10 seconds by using a server-side timer. I am now using the following meta statement to accomplish the same...
1
by: Matt Swift | last post by:
Does anyone know if a meta tag using refresh can be made into a dynamic control, given a 'runat' and 'id' ? -- Matt Swift ------------------------ Developer , S-Cool Ltd +447966670029...
2
by: Bredahl jensen | last post by:
Hello, Where can i find a dynamic content rotator. The asp.net server control only show the next content when page has refreshed. But this is boring to me. I'm not the javascript /dhtml expert...
2
by: Dst | last post by:
<head runat="server"> <noscript> <meta http-equiv='refresh' content='0;url=Unsupported.htm'/> </noscript> </head> If i add this to my webform, it redirects to Unsupported.htm if javascript...
21
by: karen987 | last post by:
I have a news website, with asp pages. It has publishing software which allows you to add articles in a database, and then calls them up from links etc. I have added dynamic meta tags in 2 parts. The...
5
by: Nick | last post by:
Hi there, I am adding a meta redirect tag to the page dynamically on 2 separate pages in asp.net. One of the pages it works fine, and 5 seconds after the page appears, the redirect occurs. On...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.