That's cool if that will work.
One thing: my plan is to cache the user's theme in the Session object. So
this code will need to be able to access both the Session object and some
database code. I assume the database code will work but now I wonder if the
Session object will be available. I would also need to get info for the
current user, which may not be set up either.
I'll have to play around with that.
Thanks.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"Scott Roberts" <sr******@no.spam.here-webworks-software.comwrote in
message news:u3**************@TK2MSFTNGP04.phx.gbl...
>But I wondered if there was any shortcut to having to set the theme in
the PreInit event for every single page.
You can set the theme in Application_PreRequestHandlerExecute in
global.asax:
private void Application_PreRequestHandlerExecute(Object sender, EventArgs
e)
{
HttpContext CurrentContext = HttpContext.Current;
Page p = ( CurrentContext.Handler as Page );
if ( null != p )
{
p.Theme = "Default";
}
}
}