Re: Programatic Access to the Theme File in VS 2008;



Better late than never for somebody to get back to you or anybody else wondering about this context but we can only dynamically change Themes, StyleSheetTheme or the MasterPage from the PreInit event.

That also means for those of us using Master Pages we are compelled to create and use a base class for all content pages that by default inherit from System.Web.UI.Page. Using a base class is the only way we can create a code block and use PreInit with Master Pages.


"Roger Stenson" <roger@xxxxxxxxxxxxxxx> wrote in message news:2463486F-73B5-4911-BD1B-BD1C8F5182CA@xxxxxxxxxxxxxxxx
Hi
I am creating a system that hopefully will be used by a lot of users each
having their own website
The system works as an add- on to an existing site and its appearance
needs to blend into to the mother site.

I can't see in VS 2008 any features to allow me to overwrite the values of
the CSS and Skin Files. In any case changing these at run time does not seem
very efficient. A cleaner way seems to be to present the User System
Administrator with a form to fill in in which he will supply the principle
appearance features of the web pages.
From this form I will write client-oriented CSS and Skin Files and install
them as themes in the App_Themes folder with a clientname. At run time I
can then use the features in VS2008 to vary the theme used by the
application e.g


Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As
System.EventArgs)
Page.Theme = Request.QueryString("ThemeChange")
End Sub



I would be grateful for advice on this approach or the alternatives used by
professionals


Roger Stenson


.