Dynamic Meta Tag not working in all pages

N

Nick

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 another page, the redirect is
completely ignored, so I have a couple of questions.

1. Any idea what could prevent redirection?
2. Any idea how I can view my dynamically added tags, and at what point
are they visible? (load / init) ?

Thanks in advance for your help.

Nick.
 
N

Nick

Hi Mark,

The meta tags do not appear when viewing the source in either, and from
what I gather, they don't appear in the source do they?

Nick.
 
N

Nick

I'm guessing you really didn't read my question did you, please note the
word "Dynamic".

I'm not suggesting meta tags dont show in the source, of course they show in
the source, that is their sole intention to show in the source.

I'm suggesting that my *dynamic* meta tag is not showing in the source code,
I cannot see it yet as I mentioned, the exact code is working elsewhere on
another page.

HtmlMeta Redirect = new HtmlMeta();
Redirect.ID = "dynamicmetatag";
Redirect.HttpEquiv = "Refresh";
Redirect.Content = string.Format("5;URL={0}", pStrURL);
Page.Header.Controls.Add(Redirect);

I step through the code and can see it being executed, but it doesn't appear
in source.

"Is this a problem with nomenclature?"
*stares blankly*

Nick.

Mark Rae said:
[please don't top-post]
The meta tags do not appear when viewing the source in either, and from
what I gather, they don't appear in the source do they?

They most certainly do. Go here: http://www.microsoft.com/, do a View
Source, and then search for meta - there's dozens of 'em...

Is this a problem with nomenclature?
 
N

Nick

It's okay now, I have found another solution.

I am now using ASP.net timer objects to fire off my delayed redirection.

Nick said:
I'm guessing you really didn't read my question did you, please note the
word "Dynamic".

I'm not suggesting meta tags dont show in the source, of course they show
in the source, that is their sole intention to show in the source.

I'm suggesting that my *dynamic* meta tag is not showing in the source
code, I cannot see it yet as I mentioned, the exact code is working
elsewhere on another page.

HtmlMeta Redirect = new HtmlMeta();
Redirect.ID = "dynamicmetatag";
Redirect.HttpEquiv = "Refresh";
Redirect.Content = string.Format("5;URL={0}", pStrURL);
Page.Header.Controls.Add(Redirect);

I step through the code and can see it being executed, but it doesn't
appear in source.

"Is this a problem with nomenclature?"
*stares blankly*

Nick.

Mark Rae said:
[please don't top-post]
Thanks in advance for your help.

Did you find any difference in the rendered markup when you did a View
Source on the two pages in question...?

The meta tags do not appear when viewing the source in either, and from
what I gather, they don't appear in the source do they?

They most certainly do. Go here: http://www.microsoft.com/, do a View
Source, and then search for meta - there's dozens of 'em...

Is this a problem with nomenclature?
 

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