Site Search:
Sign in | Join | Help
4Penny.net

VB.NET

Notes, Tricks and Tips on VB.NET

July 2008 - Posts

  • Setting Themes in web.config file

           

            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")