Dim Theme As String
Dim ThemeConfig As System.Configuration.Configuration
Dim section As PagesSection
ThemeConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/")
section = ThemeConfig.GetSection("system.web/pages")
section.Theme = Theme
ThemeConfig.Save()
Response.Redirect("~/Default.aspx")