开发者

Removing the theme from one ASP.NET page in a project

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?


I figured it out I needed StylesheetTheme="" not Theme=""


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 = "";
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜