Hi,
If you want to change the theme programmatically, you should change it in the content page's preinit event.
If you have so many page, you can try to create a basepage class that inherits from System.Web.UI.Page and override the OnPreInit event, setting the Theme there. You can then add the following to the web.config: <pages basePageType="MyBasePage" />
The page's will inherit from the new base page , and where the PreInit will run and set the theme automatically .
Hope it helps.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Yours sincerely,
Amanda Wang
Microsoft Online Community Support