62,046
社区成员
发帖
与我相关
我的任务
分享
<%@ Control Language="VB"%>
<script runat="server">
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Me.Response.Cookies("theme, per user per site").Value = Me.DropDownList1.SelectedValue
Me.Page.ClientScript.RegisterStartupScript(Me.GetType(), "reload", "setTimout(""window.location.reload()"",1)", True)
End Sub
</script>
<asp:DropDownList ID="DropDownList1" runat="server"
OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" AutoPostBack="True">
<asp:ListItem>MSN_Blue</asp:ListItem>
<asp:ListItem>MSN_CherryBlossom</asp:ListItem>
<asp:ListItem>MSN_Finance</asp:ListItem>
<asp:ListItem>MSN_Morning</asp:ListItem>
<asp:ListItem>MSN_Purple</asp:ListItem>
<asp:ListItem>MSN_Red</asp:ListItem>
<asp:ListItem>WinXP_Blue</asp:ListItem>
<asp:ListItem>WinXP_Silver</asp:ListItem>
</asp:DropDownList>
protected override void OnPreInit(EventArgs e)
{
base.OnPreInit(e);
var s = Request.Cookies["theme, per user per site"];
if (s != null && s.Value != null)
this.Theme = s.Value;
}