怎么在后台修改前台html页面的key、title、description

 public void UpdateMeta(string title, string keyword, string desc)
{ for (int i = this.Header.Controls.Count - ; i >= ; i--)
{
if (this.Header.Controls[i].GetType() == typeof(HtmlMeta))
{
HtmlMeta hmt = (HtmlMeta)this.Header.Controls[i];
if (hmt.Attributes["name"] != null)
this.Header.Controls.RemoveAt(i);
}
}
this.Page.Title = title; HtmlMeta hm = new HtmlMeta();
hm.Name = "keywords";
hm.Content = keyword;
Header.Controls.AddAt(, hm); HtmlMeta hm1 = new HtmlMeta();
hm1.Name = "description";
hm1.Content = desc;
Header.Controls.AddAt(, hm1);
}
上一篇:【LeetCode】113. Path Sum II 解题报告(Python)


下一篇:【LeetCode】113. Path Sum II 路径总和 II 解题报告(Python)