M
marss
I know that I can register a few predefined style attributes in such
way:
Style newStyle = new Style();
newStyle.ForeColor = System.Drawing.Color.Red;
Page.Header.StyleSheet.CreateStyleRule(newStyle, null, ".text");
The result of above code execution is an additional style in the head
section of the HTML document.
<style type="text/css">
..text { color:Red; }
</style>
Is there any standard way to register, for example, following style?
<style type="text/css">
..text { padding:5px 2px 10px 8px; }
</style>
I think about
Page.Header.Controls.Add(new LiteralControl(@"<style type='text/
css'> .text { padding:5px 2px 10px 8px; } </style>"));
Does a better/more standard/simpler solution exist?
Mykola
http://marss.co.ua
way:
Style newStyle = new Style();
newStyle.ForeColor = System.Drawing.Color.Red;
Page.Header.StyleSheet.CreateStyleRule(newStyle, null, ".text");
The result of above code execution is an additional style in the head
section of the HTML document.
<style type="text/css">
..text { color:Red; }
</style>
Is there any standard way to register, for example, following style?
<style type="text/css">
..text { padding:5px 2px 10px 8px; }
</style>
I think about
Page.Header.Controls.Add(new LiteralControl(@"<style type='text/
css'> .text { padding:5px 2px 10px 8px; } </style>"));
Does a better/more standard/simpler solution exist?
Mykola
http://marss.co.ua