I want send to output CSS info in style blocks
protected override void RenderContents(HtmlTextWriter output)
{
...
output.Write("<style> .... ");
}
But this block cant be nested in div block .I must place it in head.How can I do it or is there another approach?
The
this.Page.Header.Stylesheet.CreateStyleRulemethod lets you add styles to the<head>. However, the CSS attributes that you can specify are limited to those supported by theStyleclass. (You can derive your own class fromStyleif you need additional attributes.)C# example: