Theming CSSFriendly Controls in MasterPages RRS feed

  • Question

  • User-1518977582 posted


    I'm using asp.net 2.0 in Visual Studio 2005 and working in vb.net as my code behind.

    I've searched this forum for solutions but haven't found any answers to this yet. Hopefully a resident genius here can resolve this issue with me.

    I am using the CSS Friendly adapters in my masterpages website. The adapters are in my App_code directory. The generated sourcecode shows that they are in fact making it to the page.

    The themes are in my App_Themes directory and are being applied to the site via the theme attribute to the pages node of my web.config file. The cssfriendly controls appear to be completely incapable of applying these themes. Even if I specify the theme on the content page, only the masterpages and other content area elements are themed. On my LoginView I even specified skinid="LoginView" which is a direct reference to the skinid in the skin file.

    The css file in the app_themes does impact all objects of that type. The .skin file is completely ignored.

    Is this the designed behavior? It seems the skinned object sould work if there are no defined styles in the css file.

    I hope I've given you enough to go on. If not ... ask away.

    Thank you for your time!!

    Sunday, November 29, 2009 1:21 PM

All replies

  • User421672444 posted

    pls post the code that you have in your web.config file and in your web page where you try to make direct reference of the skin file

    Sunday, November 29, 2009 3:26 PM
  • User-1518977582 posted

    web.config entry (within in <system.web>)
    <pages theme="masterTheme">

    contentpage entry:
    <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" theme="masterTheme" ... %>

    Thank you

    Sunday, November 29, 2009 3:32 PM
  • User421672444 posted

    try putting the theme file directly under the project rather than App_Themes folder

    Sunday, November 29, 2009 3:34 PM
  • User-1518977582 posted

    Then it complains that the theme "cannot be found in the application or global theme directories."

    They get it to work on the asp.net/cssadapters page so I'm farily certain it can be done by anyone, assuming they haven't rewritten any handlers to make it work properly.

    addendum -- I'm not 100% about this but I am leaning towards the idea that css friendly pages can only be styled with css and not with themes. I've been able to style them fine with css in the app_themes folder but when switching to themes the go default on me. I'm still learning about how to use themes so I could be way off.

    Sunday, November 29, 2009 4:03 PM