public string CssSkin()
{
string str = "";
string CSS = DropDownList1.SelectedValue;
//Response.Write(CSS);
//Response.End();
if (CSS == "blue")
{
str = "Style/blue/blue.css";
}
else if (CSS == "red")
{
str = "Style/red/red.css";
}
return str;
}
----------------------前台HTML
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Css换肤</title>
<link href="<%= CssSkin()%>" rel="stylesheet" type="text/css" />
</head>
我就是想把数据绑定到"<%= CssSkin()%>"处来改CSS样式,请问是不是不能这样绑定数据在连接里?
{
string str = "";
string CSS = DropDownList1.SelectedValue;
//Response.Write(CSS);
//Response.End();
if (CSS == "blue")
{
str = "Style/blue/blue.css";
}
else if (CSS == "red")
{
str = "Style/red/red.css";
}
return str;
}
----------------------前台HTML
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Css换肤</title>
<link href="<%= CssSkin()%>" rel="stylesheet" type="text/css" />
</head>
我就是想把数据绑定到"<%= CssSkin()%>"处来改CSS样式,请问是不是不能这样绑定数据在连接里?
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Css换肤</title>
<link href="<%# CssSkin()%>" rel="stylesheet" type="text/css" />
</head>