Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Prashant Aggarwal 17 posts 37 karma points
    Nov 17, 2011 @ 11:15
    Prashant Aggarwal
    0

    Custom User Controls

    Hello,

     

    I have created a User control. I want to use the same in my Umbraco. 

    Can I configure the path where i have to place my ascx files. 

  • skiltz 501 posts 701 karma points
    Nov 17, 2011 @ 11:17
    skiltz
    0

    You'll want to place it in the Usercontrols directory so its discoverable by Umbraco Macros.  All subfolders under usercontrols are also fine.

  • Prashant Aggarwal 17 posts 37 karma points
    Nov 17, 2011 @ 11:19
    Prashant Aggarwal
    0

    Thanks.. but if don't want to place under UserControl Director and create my own directory in share path.... is there a way i can configure it to use the path

  • Rodion Novoselov 694 posts 859 karma points
    Nov 18, 2011 @ 11:05
    Rodion Novoselov
    0

    Hi. I'm not sure completely but you could try to change the default path to user controls by adding <add key="umbracoUsercontrolsPath" value="bla-bla-bla"/> to the <appSettings> section of your web.config file. (Though francly speaking I cannot imagine a practical reason of doing so and changing the default value.)

  • Pasang Tamang 258 posts 458 karma points
    Nov 18, 2011 @ 11:09
    Pasang Tamang
    0

    Hi Prashant

    As we all know the umbraco template is .net master file, so you can add usercontrol in template like in this way

    <%@ Register TagPrefix="nopCommerce" TagName="Header" Src="~/Modules/Header.ascx" %>

     

    Thanks

    PTamang

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies