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檔案路徑";
Copyright ©2024 才華齋 All Rights Reserved.