A
Andrew Jocelyn
Hi
When I query the pages section of the web config file it's always an empty
string.
<configuration>
<system.web>
<pages theme="MyTheme" />
</system.web>
</configuration>
I've tried running this code in various page events but I've had no luck.
protected void Page_Load(object sender, EventArgs e)
{
// Get the Web application configuration.
Configuration configuration =
WebConfigurationManager.OpenWebConfiguration("");
// Get the section.
PagesSection pagesSection =
(PagesSection)configuration.GetSection("system.web/pages");
var theme = pagesSection.Theme;
Trace.Write("Current Theme value", theme);
}
Please advise.
Thanks
Andrew
When I query the pages section of the web config file it's always an empty
string.
<configuration>
<system.web>
<pages theme="MyTheme" />
</system.web>
</configuration>
I've tried running this code in various page events but I've had no luck.
protected void Page_Load(object sender, EventArgs e)
{
// Get the Web application configuration.
Configuration configuration =
WebConfigurationManager.OpenWebConfiguration("");
// Get the section.
PagesSection pagesSection =
(PagesSection)configuration.GetSection("system.web/pages");
var theme = pagesSection.Theme;
Trace.Write("Current Theme value", theme);
}
Please advise.
Thanks
Andrew