public static HtmlLink CreateCssLink(string cssUrl) { var link = new HtmlLink(); link.Attributes.Add("type", "text/css"); link.Attributes.Add("rel", "stylesheet"); link.Href = link.ResolveUrl(cssUrl); return(link); }
private HtmlLink CreateCssLink(string cssFilePath, string media) { var link = new HtmlLink(); link.Attributes.Add("type", "text/css"); link.Attributes.Add("rel", "stylesheet"); link.Href = link.ResolveUrl(cssFilePath); if (string.IsNullOrEmpty(media)) { media = "all"; } link.Attributes.Add("media", media); return(link); }
private static HtmlLink Create_CSS_Link(string cssFilePath, string media, string id = "") { var _link = new HtmlLink(); _link.Attributes.Add("type", "text/css"); _link.Attributes.Add("rel", "StyleSheet"); _link.Href = _link.ResolveUrl(cssFilePath); if (string.IsNullOrEmpty(media)) { media = "all"; } _link.Attributes.Add("media", media); if (!string.IsNullOrEmpty(id)) { _link.Attributes.Add("id", id); } return(_link); }