public static void AddGenericLink(System.Web.UI.Page page, string type, string relation, string title, string href) { var tp = string.IsNullOrEmpty(type) ? "" : string.Format("type=\"{0}\" ", type); const string tag = "\n<link {0}rel=\"{1}\" title=\"{2}\" href=\"{3}\" />"; page.Header.Controls.Add(new LiteralControl(string.Format(tag, tp, relation, title, href))); }