Themes (confirmation question)

B

Bishop

I just started looking into themes. I need to dynamically assign them and
have been using the following code at the page level for a master page site:

Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.PreInit
Page.Theme = "myCoolTheme"
End Sub

This works great and I think that because I need to be able to dynamically
assign the theme I can't apply it site wide and just wanted further
confirmation.

Thanks!
 
C

Chris Fulstow

Maybe you could dynamically set your theme in a base Page class, then
derive all your site pages from that? This way, if you ever need to
change to logic that decides which theme to use, you'll only have to do
it in the base class.

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top