tags:

views:

21

answers:

1

Can ASP.NET themes be used per user session ? Ex : For one user,User theme called "Green" and for another user Use the theme called "Red". Or themes are for the enire web app ?

+2  A: 

Themes are defined for entire web application but usage of theme is defined per request. You can set theme used for current request in PreInit event handler of the Page instance. If you want to allow users to switch theme you should use Profile instead of Session because profile is persisted so the user will have the same theme next time he visits the site.

Ladislav Mrnka
+1 for talking about 'PreInit', because trying to set it later than pre init will fail.
Steven