ASP.NET2.0 C# 如何在不使用母板也的情况下设置网页的keywords 和description
使用母板页的有
调用母版的页面里能用
<title> <%=title%> </title>
<meta content=" <%=keywords%>" name=keywords>
<meta content=" <%=description%>" name=description>
if (!IsPostBack)
{
HtmlMeta tag = new HtmlMeta();
tag.Name = "keywords";
tag.Content = "23434234234";
Header.Controls.Add(tag);
tag = new HtmlMeta();
tag.Name = "Description";
tag.Content = "234234234234";
Header.Controls.Add(tag);
}
使用母板页的有
调用母版的页面里能用
<title> <%=title%> </title>
<meta content=" <%=keywords%>" name=keywords>
<meta content=" <%=description%>" name=description>
if (!IsPostBack)
{
HtmlMeta tag = new HtmlMeta();
tag.Name = "keywords";
tag.Content = "23434234234";
Header.Controls.Add(tag);
tag = new HtmlMeta();
tag.Name = "Description";
tag.Content = "234234234234";
Header.Controls.Add(tag);
}