I am using ASP.NET with MasterPages.
(我正在将ASP.NET与MasterPages一起使用。)
Thus i cant just place this link in my pages that reference my MasterPage. (因此,我不能仅将此链接放在引用我的MasterPage的页面中。)
<link rel="canonical" href="http://www.erate.co.za/" />
I need to place this link in though my Page Load of each one of my pages.
(我需要通过每个页面的页面加载来放置此链接。)
How would i do this through code? (我将如何通过代码做到这一点?)
I am using VB.NET but C# will also help me in the right direction. (我正在使用VB.NET,但C#也会在正确的方向上为我提供帮助。)
This is how i did it for my DESCRIPTION tag in my code behind.
(这就是我在后面的代码中为我的DESCRIPTION标记执行的操作。)
Dim tag As HtmlMeta = New HtmlMeta()
tag.Name = "description"
tag.Content = "Find or rate any company in South Africa for FREE and rate them"
Header.Controls.Add(tag)
Thanks in advance!
(提前致谢!)
ask by Etienne translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…