More in this section
Forums / Deployment / Exposing properties of user controls

Exposing properties of user controls

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Bryan Maiden
    Bryan Maiden avatar
    15 posts
    28 Aug 2006
    07 Nov 2006
    Link to this post
    Is there anything in particular that is needed to expose a property of a user control within sitefinity.

    By that I mean make: 
        1. The control appear in the cell properties dropdown and 
        2. Make the property appear in the list of properties once that control is selected from the dropdown
  2. Rebecca
    Rebecca avatar
    536 posts
    24 Sep 2012
    08 Nov 2006
    Link to this post
    Hi Bryan,

    You can upload user controls using the Controls Manager but you cannot upload assemblies with their codebehind. You'll have to upload these assemblies separately using some FTP client for example. We recommend that you use the Controls Manager for simple user controls which don't have codebehind or whose codebehind is nested in the .ascx file as <script runat="server">...</script>.
    The .ascx file should be a simple text file with a <%@ Control .... %> directive at the top.

    You can add a user control to the dropdown list, following the instructions below:
    1. Click the Control Manager button and click the Upload Control tab.
    2. Select a destination folder (if any).
    3. Click the [Browse] button and select the control file (.ascx).
    4. Click the [Upload] button.
    Aternatively, you can use Visual Studio and add the .ascx file in the  ~/Contols folder. Then you will be able to access it through the dropdown list. If you add it to a different folder, you will need to specify the folder in the Default.aspx like this:

    <radD:RadDesigner ID="designer1" Runat="server"
            ControlsPaths="Controls,Controls/Modules,Controls/PublicUsers,Your Folder"

    All public properties will automatically be exposed in the list of properties.

    For more information, please check Sitefinity Administartion Manual> Custom development with Visual Studio. NET>VS.NET Development - Practical Example .

    the telerik team
2 posts, 0 answered