Asp.net 动态添加Keywords和Description

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.Title = "try"
        Dim keywords As New HtmlMeta
        Dim des As New HtmlMeta
        keywords.Name = "keywords"
        keywords.Content = "try-1"
        des.Name = "description"
        des.Content = "try-2,try-3"
        Page.Header.Controls.Add(keywords)
        Page.Header.Controls.Add(des)
    End Sub

 

posted @ 2012-02-04 08:10  imlion  阅读(304)  评论(0编辑  收藏  举报