Not using the embedded css in the dll of css friendly control adaptors

Last post 03-02-2009 12:05 PM by SippyCup. 3 replies.

Sort Posts:

  • Not using the embedded css in the dll of css friendly control adaptors

    01-22-2009, 5:34 PM
    • Member
      point Member
    • timwhunt
    • Member since 01-22-2009, 10:27 PM
    • Posts 1

    I'm trying to use the CSS friendly control adaptors for menus, but I'm finding the embedded css like "Menu.css" is getting in the way.  That embedded css also appears to be added to my page AFTER my linked style sheet, so I don't think I can simply override those styles with my styles.

     I've added this to my project via the precompiled dll.  Is the any way to not use or override those embedded css files?

     I believe the alternative is to download the source and change or remove the css before compiling, but that's a lot harder for me.

     Thanks for any suggestions!

     -Tim

  • Re: Not using the embedded css in the dll of css friendly control adaptors

    02-17-2009, 1:49 PM
    • Member
      16 point Member
    • SippyCup
    • Member since 12-12-2008, 4:38 PM
    • Posts 20

    As far as I can tell, the reference to the included CSS files is somewhere within the DLL. I'm working with this right now too, and the way I'm having to do it is to merge my existing CSS with Menu.css (included with the source files). It's time-consuming and annoying, but so far, it seems to be working. I actually had to modify MenuAdapter.cs too.. and I'm not finished yet. Ick!

  • Re: Not using the embedded css in the dll of css friendly control adaptors

    02-17-2009, 1:54 PM
    • Member
      16 point Member
    • SippyCup
    • Member since 12-12-2008, 4:38 PM
    • Posts 20

     Just an update.. I checked out MenuAdapter.cs out of curiosity and ran across this:

     
    // Menu.css
    Helpers.RegisterEmbeddedCSS("CSSFriendly.CSS.Menu.css", type, this.Page);

     
    It looks like that's some sort of funky way of representing a directory structure. Normally, it would be CSSFriendly/CSS/Menu.css. That's what I assume, anyway, so if you drop your CSS file into the CSS folder and change this line to:

      

    // Menu.css
    Helpers.RegisterEmbeddedCSS("CSSFriendly.CSS.YourStyleSheet.css", type, this.Page);
     

    then it will reference your stylesheet. Instead of going through the rest of the code behind file and changing every reference it makes to their CSS classes, I recommend just copying Menu.css into your stylesheet and adding/changing whatever you need. To get it to recompile the DLL, just create an App_Code folder under the root directory of your web app and drop the new MenuAdapter.cs in there.

    Hope it works! :)

  • Re: Not using the embedded css in the dll of css friendly control adaptors

    03-02-2009, 12:05 PM
    • Member
      16 point Member
    • SippyCup
    • Member since 12-12-2008, 4:38 PM
    • Posts 20

     One more update.. I don't think placing the .cs files in App_Code actually recompiles the CSSFriendly.dll, it just compiles separately. To recompile CSSFriendly.dll, you need to open the CSSFriendly project in Visual Studio and "publish" the website.

Page 1 of 1 (4 items)