Disable the. Skin and. CSS in the topic at the same time in. NET2005.

Source: Internet
Author: User
Tags html tags

I don't know what's going on. After configuring the full board in Web.config, a single page does not want to apply the theme, and using the following code is not possible:

Configuration in Web.config:

<pages theme="DefaultThems"></pages>

The code to add to the page to disable the theme:

<%@ EnableTheming="false" %>

By reason of this, the page is set up, this page should no longer apply the theme, but in fact is not.


I use the XMLHTTP implementation of the Do not refresh processing page xmlhttp.aspx. There is no HTML code on this page, so using the theme will make the mistake of using the theme CSS file to require a header control on the page. (For example < head runat= "server"/>)

So the idea of disabling the theme of the Xmlhttp.aspx page, plus enabletheming= "false" or report this error. Depressed.


Carefully based on the error message, and then added to the page tab: Stylesheettheme= "". Try it again!

Experience to know: the original enabletheming= "false" can only disable the theme of both. skin file, but the theme of the style file. CSS is not disabled.

But there's a problem, because I'm using the Xmlhttp.ascx control instead of. aspx, and then adding it to Moss, so I can't add stylesheettheme= "" to the page tab, so just add the following code to the Xmlhttp.ascx control:

< head runat="server">< /head>

Then clear all the HTML tags in the Xmlhttp.ascx.cs file:


Turning round, the problem was finally solved.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.