We have a page that creates a printable version of the customer's bill. We are using themes via <pages styleSheetTheme="CityDesign">
. This page is not using the Master page nor has any style sheet associated with it. I have added <%@ Page Language="C#" EnableTheming="false" Theme="" %>
to the page and protected void Page_PreInit(object sender, EventArgs e) { Page.Theme = String.Empty;}
to the code behind. The page still has the theme applied. What am I doing wrong?
Removing the theme from one ASP.NET page in a project
Asked Answered
I figured it out I needed StylesheetTheme=""
not Theme=""
I needed to use Theme, but this answer led me to the right place. It seems like one of the two will work –
Fossette
The accepted answer didn't work for me. I couldn't get anything to work in the markup, but this solution does work in the code-behind file (aspx.cs for example).
Just add this method to your code-behind file:
protected void Page_PreInit(object sender, EventArgs e)
{
Page.Theme = "";
}
© 2022 - 2024 — McMap. All rights reserved.