More in this section

Forums / General Discussions / Adding Custom Controls

Adding Custom Controls

4 posts, 0 answered
  1. Eric
    Eric avatar
    147 posts
    Registered:
    12 Nov 2007
    13 May 2010
    Link to this post
    Maybe I'm overlooking it (or maybe it hasn't been implemented yet), but how do you add custom controls to SF4? 3.7 had an upload dialog.

    I've had some success with editing ToolboxesConfig.config. I can get controls that are classes to work, but not ASCXes.

    In 3.7, my web.config had
    <add name="SimpleLink" section="My Controls" type="OtherProject.SimpleLink, OtherProject" />
    <add name="ComplexLink" section="My Controls" url="~/UserControls/MyControls/ComplexLink.ascx" />

    In 4.0, I'm working with the following.
    <add name="MyControlsControlsSection" title="MyControlsControlsSectionTitle" description="MyControlsControlsSectionDescription" resourceClassId="PageResources">
      <tools>
        <
    add name="SimpleLink" title="SimpleLink" description="SimpleLink" cssClass="sfNavigationIcn" type="MyControls.SimpleLink, MyControls" />
        <
    add name="ComplexLink" title="ComplexLink" description="ComplexLink" cssClass="sfNavigationIcn" url="~/Sitefinity/CustomControls/ComplexLink.ascx" />
      </tools>
    </
    add>

    The SimpleLink works, the ComplexLink throws an exception when trying to set embedded control properties in the Page_Load event.

    I cut-and-pasted from the navigation controls section, that's why there are some references to navigation.
  2. Eric
    Eric avatar
    147 posts
    Registered:
    12 Nov 2007
  3. jkregala
    jkregala avatar
    159 posts
    Registered:
    22 Sep 2009
    18 Oct 2010
    Link to this post
    Hello Telerik team, I might as well add this question here as a follow up. Manual addition of controls for me is fine, however when I try the functionalities available on the CMS site itself for Adding Custom Controls, I keep having this error:

    Access to the path 'D:\path_here\App_Data\Sitefinity\Configuration\ToolboxesConfig.config' is denied.

    I've removed restrictions on that directory and placed settings so that my current login would be treated as admin, I wonder what's wrong.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    18 Oct 2010
    Link to this post
    Hi jkregala,

    Access to the path 'D:\path_here\App_Data\Sitefinity\Configuration\ToolboxesConfig.config'


    ASP.NET or NETWORK SERVICE account does not have read/write permissions over AppData/Sitefinity/Configurations folder. Please grant ASP.NET or NETWORK SERVICE with read/write permissions.

    Regards,
    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
4 posts, 0 answered