动态改变page的theme

Global.asax的代码如下:

<%@ Application Language="C#" %>

<script runat="server">

void Page_PreInit(object sender, BrockAllen.Web.PageEventArgs e)
{
string t = HttpContext.Current.Profile.GetPropertyValue("Theme") as string;
if (t != null && t.Length > 0)
{
e.Page.Theme = t;
}
else
{
e.Page.Theme = "Default";
}
}

你可能感兴趣的:(动态改变page的theme)