Skip Navigation LinksHome / Community & Support / Code Library / ASP.NET and ASP.NET AJAX > General and Integration Projects > Including custom StyleSheets as WebResources to RadStyleSheetManager

Not answered Including custom StyleSheets as WebResources to RadStyleSheetManager

Feed from this thread
  • Posted on May 23, 2008 (permalink)

    Requirements

    RadControls version

    Telerik.Web.UI (Q1 2008 +)

    .NET version

    3.5

    Visual Studio version

    2008

    programming language

    C#

    browser support

    all browsers supported by RadControls


     
  • PROJECT DESCRIPTION

    This is the accompanying project of the help topic on
    Including custom StyleSheets as WebResources to RadStyleSheetManager.

    It shows how RadStyleSheetManager can be used to read css resource information from assemblies and output a single <link> tag to the page HTML. As a specific example, I add the Telerik skin for RadCombobox as a WebResource assembly to the project. For a step-by-step guide, please refer to the help topic.
Attached files

Reply

  • Posted on Aug 5, 2009 (permalink)

    A WinForms tool for creating embedded custom skins to be used with RadStyleSheetManager is now available at:

    Tool for Embedding Custom Skins into an Assembly

    Reply

  • Johan avatar

    Posted on Jan 25, 2011 (permalink)

    1 line method doesn't work anymore (Telerik.Web.UI.dll 2010.3.1215.40)
    Only seems to work if you explicitly specify the controls

    Reply

  • Simon Simon admin's avatar

    Posted on Jan 31, 2011 (permalink)

    Hello Johan,

    I just tested the method and it still works with v2010.3.1215.

    Can you please be a bit more specific? What do you mean by explicitly specifying the controls? 

    All the best,
    Simon
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

    Reply

  • Johan avatar

    Posted on Jan 31, 2011 (permalink)

    Hi Simon,
    see
    Home / Community / Forums / ASP.NET AJAX > SkinManager > Does RadSkinManager work with custom (non-embedded) skins?

    Currently I cannot build the project in
    anymore. It is vs2008 and I get build errors (Telerik not found).
    When I try to build a new rad web project I get

    ---------------------------

    Microsoft Visual Studio

    ---------------------------

    Error executing custom action Telerik.Web.UI.VSX.Actions.UnfoldFilesAction:

    Could not find file 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Telerik\Telerik WebUI VSExtensions\2010.3.1214.0\ControlScenarios\General\TelerikEnabledWebForm\Default.aspx.t4'.

    ---------------------------

    OK

    ---------------------------

    After re-installing telerik components I will try to create a new project and test it and get back to you.

    regards,
    Johan

     

     

    Reply

  • Johan avatar

    Posted on Jan 31, 2011 (permalink)

    Okay, I'm back. I installed 2010.3.1317.40 and created a RadControls Web Application in VS2010. I created a skin TestSkin001 with the visual style builder at stylebuilder.telerik.com and created an assembly TestSkin001Assembly.dll file with WebResourceAutoBuilder and put it in the bin folder of my project. Now I have a page with a radcalendar and a radcombobox in them. Both have

    Skin

     

     

    ="TestSkin001" EnableEmbeddedSkins="False"

     

    If I register them like this:

     

     

    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">

     

     

     

    <StyleSheets>

     

     

     

    <telerik:StyleSheetReference Name="TestSkin001Assembly.TestSkin001.Calendar.TestSkin001.css" Assembly="TestSkin001Assembly" />

     

     

     

    <telerik:StyleSheetReference Name="TestSkin001Assembly.TestSkin001.ComboBox.TestSkin001.css" Assembly="TestSkin001Assembly" />

     

     

     

    </StyleSheets>

     

     

     

    </telerik:RadStyleSheetManager>

     

    this works fine,

    but if I register with a single line, like this:

     

     

    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">

     

     

     

    <StyleSheets>

     

     

     

    <telerik:StyleSheetReference Name="TestSkin001Assembly.TestSkin001.css" Assembly="TestSkin001Assembly" />

     

     

     

    </StyleSheets>

     

     

     

    </telerik:RadStyleSheetManager>

     


    this does not work. What is wrong?

    If you want I can send you the project but need an email address or upload fascility.

    regards,
    Johan

    Reply

  • Simon Simon admin's avatar

    Posted on Feb 13, 2011 (permalink)

    Hello Johan,

    Perhaps the generic .css file does not exist in the assembly. Can you verify with FireBug or Fiddler whether the Telerik.Web.UI.WebResource.axd response is OK?

    In any case, a sample project showing this issue will help me find the cause of the issue easier. Please send a project via a support ticket (and also mention this Code Library project).

    Regards,
    Simon
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

    Reply

  • Eric avatar

    Posted on Mar 22, 2011 (permalink)

    Great tool! Easily converted Bryan's project to VS2010.
    I actually downloaded several zip files from VisualStyleBuilder, modified them and zipped them all back up together.
    Only problem I had was I noticed some WebResource 404 errors and images were not coming up.

    Turns out the Menu skin generated from VisualStyleBuilder contained css with WebResources in it which caused an error when I used Bryan's project.

    So if you are getting 404 errors or missing styelsheets/images then make sure to search your downloaded css files for content like:

    .RadMenu_CustomSkin .rmRootGroup,
    .RadMenu_CustomSkin .rmFirst,
    .RadMenu_CustomSkin a.rmLink,
    .RadMenu_CustomSkin .rmText,
    .RadMenu_CustomSkin .rmLeftArrow,
    .RadMenu_CustomSkin .rmRightArrow,
    .RadMenu_CustomSkin .rmTopArrow,
    .RadMenu_CustomSkin .rmBottomArrow
    {
        background-image: url(<%= WebResource("CustomSkin.CustomSkin.Menu.rmSprite.png") %>);
    }

    and replace with something like:

    .RadMenu_CustomSkin .rmRootGroup,
    .RadMenu_CustomSkin .rmFirst,
    .RadMenu_CustomSkin a.rmLink,
    .RadMenu_CustomSkin .rmText,
    .RadMenu_CustomSkin .rmLeftArrow,
    .RadMenu_CustomSkin .rmRightArrow,
    .RadMenu_CustomSkin .rmTopArrow,
    .RadMenu_CustomSkin .rmBottomArrow
    {
        background-image: url('Menu/rmSprite.png');
    }

    Then zip it all back up and use Bryan's tool to embed your files into a dll.

    Eric

    Reply

  • Posted on Jun 21, 2011 (permalink)

    Downloaded the .zip, unzipped and built the project (I have both VS2008 and VS2010 on my laptop). I cannot find the Telerik.Charting.dll and Telerik.Charting.xml files. When I run the project I figured I would get a complaint about the Charting dll and not:

     

    Server Error in '/' Application.

    Could not load file or assembly 'Telerik.Web.UI, Version=2008.1.515.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)



    OK. So what am I doing wrong?

    Thanks,
    Doug

    Reply

  • Simon Simon admin's avatar

    Posted on Jun 23, 2011 (permalink)

    Hi Douglas,

    Thank you for letting us know about the issue.

    There is a hard-coded version of the Telerik.Web.UI assembly in the web.config of the project. This triggers the error when you deploy another version.

    I modified the project so that this specific reference is more general. Please download it again to get the updated version.

    Best wishes,
    Simon
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

    Reply

  • Niels avatar

    Posted on Jul 26, 2011 (permalink)

    nevermind

    Reply

  • Sarulatha avatar

    Posted on Mar 20, 2012 (permalink)

    Hello Simon,

                            I have created the Separate Class library and added the css/Images. When I have built this class library and added the .dll with my project file. My project is loaded I am not able to apply the css which is availablbe in the class library.


    From the master page I have created a child page, for that child page I am not able to apply the .css and the images are also not loaded in the specific child page.


    Here is the code in Master page:-


    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">

            <StyleSheets>

    <telerik:StyleSheetReference Name="NispCSSAssembly.Button.Default.css"

                    Assembly="NispCSSAssembly"></telerik:StyleSheetReference>

    </StyleSheets>

    </telerik:RadStyleSheetManager>

     

     

    The code of .css image reference:-

     

    background-image:url('<%=WebResource("NispCSSAssembly.Button.ButtonSprites.gif")%>');

     

    Please help me out in this issue.

    Regards,

    Subbu

    Reply

  • Simon Simon admin's avatar

    Posted on Mar 21, 2012 (permalink)

    Hi Sarulatha,

    Please submit your query via the support ticketing system because we will need a sample project to help you resolve the problem you are facing. This thread discusses the Code Library Project itself - the solution and code.

    Regards,
    Simon
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.

    Reply

  • Back to Top

    Skip Navigation LinksHome / Community & Support / Code Library / ASP.NET and ASP.NET AJAX > General and Integration Projects > Including custom StyleSheets as WebResources to RadStyleSheetManager