I had this problem before, when I copied info from the chapter-by-chapter code that somebody posted. I solved this by making sure every one of my pages inherited from the custom BasePage class. Meaning, my code-behind file, for my contact page for example, has the class statement written like this:
public partial class contact : BasePage
instead of just
public partial class contact : Page
It's the Basepage class that has that "OnPreInit" method that actually assigns the theme.
Hope this helps.
|