I am trying to add css form code. My site uses the main page. I get an error. The collection of controls cannot be modified because the control contains blocks of code (i.e. <% ...%>).
my snipet code
string CssClass = string.Format("{0}/{1}?$BUILD$", BaseImageUrl, CssFileName); HtmlLink css = new HtmlLink(); css.Href = CssClass; css.Attributes["rel"] = "stylesheet"; css.Attributes["type"] = "text/css"; Header.Controls.Add(css);
Any suggestions?
user339160
source share