Adding meta tag programmatically in C#

后端 未结 10 1152
渐次进展
渐次进展 2020-12-14 01:24

I\'m trying to programmatically add a . It is working fine when there is a Head element with runat = \"server\" in the

10条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-14 01:29

    Or you could just put your meta-tag in the header, with an ID and a runat="server"... then in the code behind say

    myMetaTag.Content = "noindex,follow";
    

    or

    myMetaTag.Visible = false;
    

    or whatever you'd like.

提交回复
热议问题