Meta tags question

  • Thread starter Thread starter Maziar Aflatoun
  • Start date Start date
M

Maziar Aflatoun

Hi,

I like to add content="10;url=http://www.google.com/" to my refresh tag.
The following still doesn't work. Can someone tell me please what I'm doing
wrong? (Note: It's not a new meta tag but an already existing one)

I have the following code
<HEAD>
<meta id="MyRefresh" http-equiv="refresh" runat="server"/>
</HEAD>


private HtmlGenericControl MyRefresh;

private void Page_Load(object sender, System.EventArgs e)
{
MyRefresh = new HtmlGenericControl("meta");
MyRefresh.ID = "MyRefresh";
MyRefresh.Attributes["content"] = "10;url=http://www.google.com/";
...

Thanks
Maz.
 
Hi,

Do the foll.

declare the MyRefresh instance variable as protected rather than private in
the codebehind.
No need to create a new instance of that instance, the runtime will create
it for u.
Only the foll. line is required.
MyRefresh.Attributes["content"] = "10;url=http://www.google.com/";
 
Back
Top