Adding the CANONICAL tag to my page for SEO through code behind?
This is what i had to do..................
Dim seoTag As HtmlLink = New HtmlLink()
seoTag.Attributes.Add("rel", "canonical")
seoTag.Href = "http://www.erate.co.za/"
Header.Controls.Add(seoTag)
More information Here
Why not create your canonical element as a server control:
<link rel="canonical" href="" runat="server" id="canonical"/>
Then manipulate the canonical object in your page (or master page) class. Generic tags are treated as instances of HtmlGenericControl
which allows one to set arbitrary attributes:
canonical.Attributes["href"] = whatever;