HBK
HBK

Reputation: 129

Add meta tags in User control

How to add meta tags in User control??? I want to add rel="nofollow" attribute to all links in user control. How to add rel attribute to all links. Please help. Thanks in advance

Upvotes: 1

Views: 1170

Answers (2)

Antonio Bakula
Antonio Bakula

Reputation: 20693

You can simply add rel to markup, like this :

<asp:HyperLink ID="link" runat="server" rel="nofollow" NavigateUrl="http://www.url.com">url</asp:HyperLink>

Upvotes: 1

mtsiakiris
mtsiakiris

Reputation: 190

Try this:

<asp:HyperLink ID="MyLink" runat="server" NavigateUrl="http://www.ttt.com">MyLink</asp:HyperLink>

code behind:

this.MyLink.Attributes.Add("rel", "nofollow");

Upvotes: 1

Related Questions