草庐IT

HtmlMeta

全部标签

c# - 动态读取元标签

谁能帮我弄清楚如何在asp.net页面中简单地编写元标记。元标记已插入页面中,我只想遍历它们并编写关键字标记。我可能没有动态添加,只是阅读。 最佳答案 .usingSystem.Web.UI.HtmlControls;//...Listmetas=newList();foreach(Controlcinthis.Page.Header.Controls)if(c.GetType()==typeof(HtmlMeta)){HtmlMetameta=(HtmlMeta)c;if(meta.Name=="Keywords")meta.Co