开发者

How to change metatags dynamically?

I am working on a site w开发者_运维技巧here the meta tags are set in a Masterpage in a section using runat="server". I can update the title, description, keywords, etc... through properties in the Masterpage code-behind, but how would I add or edit non-basic ones such as

I have tried the following, but it always returns 0 for the count.

   Dim header As Web.UI.HtmlControls.HtmlHead
            header = TryCast(Me.Master.FindControl("headerIdName"), Web.UI.HtmlControls.HtmlHead)
            Dim count As Integer = header.Controls.Count


You have to iterate through the controls in the header:

How do I retrieve a custom meta tag in a page?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜