JerrySoft

导航

HtmlHeader的一些使用方法

1. 修改标题:
this.Header.Title = "This is the new page title.";

2. 添加CSS样式:
Style style = new Style();
style.ForeColor = System.Drawing.Color.Navy;
style.BackColor = System.Drawing.Color.LightGray;
this.Header.StyleSheet.CreateStyleRule(style, null, "body");

3. 链接外部的CSS样式表:
HtmlLink link = new HtmlLink();
link.Attributes.Add("type", "text/css");
link.Attributes.Add("rel", "stylesheet");
link.Attributes.Add("href", "~/newstyle.css");
this.Header.Controls.Add(link);

posted on 2006-10-18 17:22  水-手  阅读(311)  评论(0)    收藏  举报