views:

19

answers:

0

I've added the following code before the html opening tag on a .ascx file which is used as a master page for the site. Can anyone see any reason why this isn't working? When I view the page source, the robot metatag does not exist:

 <script language = "vb" runat = "server">
    Public Sub Page_Load(Sender As Object, E As EventArgs)


    Dim hm As New HtmlMeta()

        Dim head As HtmlHead = CType(Page.Header, HtmlHead)

        hm.Name = "ROBOTS"

        hm.Content = "NOINDEX, NOFOLLOW, NOARCHIVE"

        head.Controls.Add(hm)

    end sub
    </script>