Dynamic Meta Tag not working in all pages

  • Thread starter Thread starter Nick
  • Start date Start date
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.
 
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.
 
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?
 
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?
 
Back
Top