If I understand you correctly, I believe you hit a timing issue.
Button_Click fires later than preinit. So, in PreInit you set the theme you previously assigned to a session variable. Then the button's click fires, and the new value is stored in session, but *not* applied to the theme. Then you hit another button, the theme in PreInit is set to the *previously* selected theme and then the new value is stored in session state. And so on and so forth; you're always one step too late.
The solution: redirect to the same page after you have stored the theme in session state. That way, PreInit fires for a new request and the correct theme is applied.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
Beginning ASP.NET 3.5 : in C# and VB,
ASP.NET 2.0 Instant Results and
Dreamweaver MX 2004
Want to be my colleague? Then check out this post.