Programmatically adding LINKs to HTML HEADER in Code Behind

In this example, I am adding a link to the HTML header pointing to an RSS feed.

HtmlLink link = new HtmlLink();
link.Attributes.Add("type", "application/rss+xml");
link.Attributes.Add("rel", "alternate");
link.Attributes.Add("href", Page.ResolveClientUrl("~/rss/LatestArticles/"));

Post a Comment

Please do not post any spam link in the comment box😊

Previous Post Next Post

Blog ads