G
Guest
I'm inheriting from a custom page class instead of System.Web.UI.Page, and I
want to add a .css or .js link to the page's <head> tag. Can this be done?
I tried this using but it just adds it to the bottom of the page....I need
to somehow reference the <head> server-side?
HtmlGenericControl link = new HtmlGenericControl("LINK");
link.Attributes.Add("rel","stylesheet");
link.Attributes.Add("type","text/css");
link.Attributes.Add("href","/Css/Main.css");
Controls.Add(link);
want to add a .css or .js link to the page's <head> tag. Can this be done?
I tried this using but it just adds it to the bottom of the page....I need
to somehow reference the <head> server-side?
HtmlGenericControl link = new HtmlGenericControl("LINK");
link.Attributes.Add("rel","stylesheet");
link.Attributes.Add("type","text/css");
link.Attributes.Add("href","/Css/Main.css");
Controls.Add(link);