More in this section

Forums / Developing with Sitefinity / How to wrap Generic Content control?

How to wrap Generic Content control?

5 posts, 1 answered
  1. Jay
    Jay avatar
    51 posts
    Registered:
    16 Jul 2008
    12 Feb 2010
    Link to this post
    I'd like to have a custom control where the user can use the radEditor to enter in their content and that content gets wrapped with some custom divs with CSS classes. 

    This question has been asked a dozen times before and all the answers point to this article: http://www.sitefinity.com/support/kb/sitefinity-3-x/how-to-wrap-a-generic-content-control-in-3-6-sp1.aspx

    I can't seem to get this to work however.  I've replicated all of the code (and even just tried to use this as is to see if my customization was the problem) but I keep having problems.  Whenever I try to add the user control into Sitefinity by uploading the DLL I get this error: "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

    Anyone have any luck actually getting this to work?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    12 Feb 2010
    Link to this post
    Hi Jay,

    Please make sure that the  assembly you have was compiled against the version of the referenced top level assembly that is located in your bin. I checked the code and it is working fine. First you can try to add it to your App_Code and then create a class library and compile it.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Jay
    Jay avatar
    51 posts
    Registered:
    16 Jul 2008
    12 Feb 2010
    Link to this post
    That's very helpful.  Thanks Ivan.  I hadn't even thought of that.     Now that I've updated everything and re-compiled it I get the following error when I try to add the DLL - "An error occurred loading a configuration file: Failed to map the path '/'."  I'm trying to add the control by uploading it from within the Sitefinity editor... is that the right way?   All of my other custom controls are just .ascx files and I manually edit the web.config to add them to the tool box.  This is the first control I've ever created as a DLL.  Any other insight you could give would be appreciated.

    Thanks
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    12 Feb 2010
    Link to this post
    Hello Jay,

    Try to register the control in the web.config manually.

    1. Add the compiled control to your bin folder
    2. Then register it in your web.config, toolboxControls section

    sample

    <add name="SomeName" section="SomeSection" type="YourNameSpace, ClassLibraryName" />
    <!--<add name="RadTabStrip" section="RadControls" type="Telerik.Web.UI.RadTabStrip, Telerik.Web.UI" />-->


    All the best,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
    Answered
  5. Jay
    Jay avatar
    51 posts
    Registered:
    16 Jul 2008
    12 Feb 2010
    Link to this post
    Brilliant!  That's perfect.  It's working now.  Thanks so much for your help.  Your support, as always, is incredible.
Register for webinar
5 posts, 1 answered