A
Abraham Andres Luna
hello everyone,
this code only removes the first HtmlMeta control even though i loop through
all of the controls:
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object Sender, EventArgs E)
{
foreach (Control ctl in Page.Header.Controls)
if (ctl.GetType().ToString() == "System.Web.UI.HtmlControls.HtmlMeta")
Page.Header.Controls.Remove(ctl);
}
</script>
<html>
<head runat="server">
<title>HtmlMeta Test Page</title>
<meta name="description" content="long description" />
<meta name="keywords" content="keyword list" />
</head>
<body>
Done!
</body>
</html>
thanks for any help with this.
this code only removes the first HtmlMeta control even though i loop through
all of the controls:
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object Sender, EventArgs E)
{
foreach (Control ctl in Page.Header.Controls)
if (ctl.GetType().ToString() == "System.Web.UI.HtmlControls.HtmlMeta")
Page.Header.Controls.Remove(ctl);
}
</script>
<html>
<head runat="server">
<title>HtmlMeta Test Page</title>
<meta name="description" content="long description" />
<meta name="keywords" content="keyword list" />
</head>
<body>
Done!
</body>
</html>
thanks for any help with this.