Header.LinkedStylesheets missing from .NET v2 Beta 2

G

Guest

When using a master page In .NET v2.0 Beta 1, you could attach additional
stylesheets to the master page from your content pages, with a call such as:

Header.LinkedStyleSheets.Add("_Styles/Stylesheet.css");

In Beta 2, it seems as though IPageHeader no longer exposes this property.

Does anyone know what the new approach / work-around is?

Thank in advance.
 
G

Guest

OK, I've found a work-around, but it's pretty shady (in comparison):

System.Web.UI.HtmlControls.HtmlLink stylesheet =
new System.Web.UI.HtmlControls.HtmlLink();
stylesheet.Href = "_Styles/Stylesheet.css";
stylesheet.Attributes["rel"] = "stylesheet";
stylesheet.Attributes["type"] = "text/css";
head.Controls.Add(stylesheet);

/gerrod
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top