Another Method, in the application PreRequestHandlerExcute
void Application_PreRequestHandlerExecute(object sender, EventArgs e)
{
Page page = Context.Handler as Page;
if (page == null)
return;
//Get the theme
page.PreInit += delegate
{
page.Theme = theme;
//Update the cookie
};
}
{
Page page = Context.Handler as Page;
if (page == null)
return;
//Get the theme
page.PreInit += delegate
{
page.Theme = theme;
//Update the cookie
};
}
不过这个方法还要配合其它代码来一起实现才可以