Meta tags question

  • Thread starter Maziar Aflatoun
  • 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.
 
G

Guest

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/";
 

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