asp.net动态加载CSS

在<head></head>中间可以写上<link id="css" href="../style/default.css" runat="server" rel="Stylesheet" type="text/css" />

在后台page_load()中写上:

myPageCssPath.Attributes["href"] = "../style/StyleSheet.css";

 

就OK!

posted @ 2010-01-11 15:05  草市江田  阅读(92)  评论(0)    收藏  举报