< head >
< link id ="MyStyleSheet" rel ="stylesheet" type ="text/css" runat ="server" />
</ head >
之后,在要更换CSS的页面中,使用如下代码
Sub Page_Load(Sender As Object, E As EventArgs)
If Not (IsPostBack)
MyStyleSheet.Attributes.Add("href","/css/flostyle.css")
End If
End Sub