This is a migrated thread and some comments may be shown as answers.

Problem using webresource and iframe treeview skin

0 Answers 50 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
archimede
Top achievements
Rank 1
archimede asked on 02 Jul 2013, 07:40 AM
Good day,

we have one treeview in a masterpage content, which is skinned using

    <telerik:RadStyleSheetManager ID="rssm" runat="server">
        <StyleSheets>
            <telerik:StyleSheetReference Assembly="Ourskinsproject.Skins" Name="Ourskinsproject.Skins.TreeView.Ourskin.css" />

The CSS file is in our project, and uses the webresource like this

.Ourtreestyle .rtPlus, .rtMinus
{
    background-image: url('<%=WebResource("Ourskinsproject.Skins.TreeView.PlusMinus.png")%>');
}


And the treeview renders correctly. Images are in fact embedded in the DLL.

The problem is:
Inserting the same treeview into a different page, in an IFRAME (no masterpage), "breaks" the skin, which elements become invisible, meaning that they will not be parsed from webresource, and the image urls remain in their
'<%=WebResource("Ourskinsproject.Skins.TreeView.PlusMinus.png")%>'

unparsed format.

We use code to add the skin to the page, like this

    protected override void OnInit(EventArgs e)
    {
...
        StyleSheetReference cssTreeview = new StyleSheetReference("Ourskinsproject.Skins.Treeview.Ourskin.css", "Ourskinsproject.Skins");
...
        radStyleSheetManager.StyleSheets.Add(cssTreeview);


The css is actually present in the page, and its styles are available and applied, but URLs will not be processed by the webresource.

What are we missing? What needs to be done for the css to be parsed, other than adding it to the page?

Thanks in advance.

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
archimede
Top achievements
Rank 1
Share this question
or