asp.net - send info from custom server asp element -
I want to send output to CSS information in style block
protected override zero render contents (HtmlTextWriter Output) {... output.Write ("Style & gt; ...."); } But this block can be nested in the devil block. I should keep it in the head. How can I do this or any other way?
The method allows you to & lt; Head & gt; However, CSS attributes that you can specify are limited to those supported by the class. (You can get your code from style , if you need additional features.) C # example:
secure Override Zero OnPreRender (EventArgs E) {Base.OnPreRender (E); // Create a style object for the page body. Style body style = new style (); BodyStyle.ForeColor = System.Drawing.Color.Blue; BodyStyle.BackColor = System.Drawing.Color.LightGray; // Add a heading // heading style to the current rule page. This rule body is for HTML element This.Page.Header.StyleSheet.CreateStyleRule (body style, blank, "body"); }
Comments
Post a Comment