Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity 2.x: Deployment > Exposing properties of user controls

Exposing properties of user controls

  • Posted on Nov 7, 2006 (permalink)

    Hi,
    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

    Reply

  • Rebecca Rebecca admin's avatar

    Posted on Nov 8, 2006 (permalink)

    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 .


    Regards,
    Rebecca
    the telerik team

    Reply

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity 2.x: Deployment > Exposing properties of user controls