1. 添加CSS样式:
Style style = new Style();
Color = ;
Color = tGray;
teStyleRule(style, null, "body");
2. 链接外部的CSS样式表:
HtmlLink link = new HtmlLink();
("type", "text/css");
("rel", "stylesheet");
("href", "~/");
(link);
方法3 public string m_StyleSrc = y; //公共变量 ,样式文件路径
private void Page_Load(object sender, tArgs e) {
m_StyleSrc = "../"; //页面加载时赋值 }
}
方法4 下面这个方法没试过,不知是否能用
protected void Page_Onload(object sender, EventArgs e) {
eSheetTheme = "../css/";
}
方法5 页面:
后台
= "css文件路径";