| re: Meta tag modification still doesn't work
On Mon, 09 Aug 2004 15:03:29 GMT, Maziar Aflatoun <maz00@rogers.com> wrote:
[color=blue]
> 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.
>
>[/color]
Also just noticed, make the declaration protected HtmlGenericControl
MyRefresh, not private...this line should look just like the other
controls and how they're declared. It must be protected so the .aspx
links up w/ this var....
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET |