meta and runat=server

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,

i'm trying to walk along in this article from informit.com and stumble
across an issue i can't figure out. it's simple one-liner.

<meta id="mtaRefresh" runat="server" />

the example from the article uses in-line code to reference this element by
saying:
mtaRefresh.Attributes.Add(etc...

however, i'm trying to re-code in the code-behind and the code-complete is
not seeing mtaRefresh. Am i missing something?

thanks,
rodchar
 
As the meta tag is not inside the form, it's not declared automatically
in the code behind. You have to declare it manually:

protected HtmlGenericControl mtaRefresh;
 
thank you so much.

Göran Andersson said:
As the meta tag is not inside the form, it's not declared automatically
in the code behind. You have to declare it manually:

protected HtmlGenericControl mtaRefresh;
 
Back
Top