Copied to clipboard

Flag this post as spam?

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


  • tesuji 95 posts 139 karma points
    Aug 16, 2010 @ 19:53
    tesuji
    0

    Custom control newbie - need advice, tips

    I want to create a page in Umbraco that gets/receives page data from a WCF web service. 

    It seems like I would need to use a .NET custom control (.dll) for this page. It doesn't seem like a plan user control (.ascx) would work, because to use WCF I need to include a Service Reference in my Visual Studio project - I don't think you can include that with a .ascx - am I correct?
    Am I heading in the right direction, by using a custom control for this? 
    Where should I put my .dll on the Umbraco server?
    I have seen in the Umbraco "create macro" page where I need to enter "Assembly" and "Type" for my .dll. How do I know what to enter here?

  • Sascha Wolter 615 posts 1101 karma points
    Aug 16, 2010 @ 21:09
    Sascha Wolter
    0

    Hi tesuji,

    You are definitely heading in the right direction. You can create a plain ascx user control and add the reference to the WCF service to the project. The reference will be included in the .dll you will build. The .dll will be placed in the /bin folder of your Umbraco installation. You will also need to copy the ascx file to the /usercontrols folder so it can be picked up by Umbraco. To use the usercontrol in Umbraco you will need to create a new macro and just select the ascx file form the drop down list and that's it (well, obviously you still need to put the macro on a template).

    The foundation series in the developer section of the umbraco.tv videos will give you a great deal more info on this and show you how to do it step by step, check this out: http://umbraco.org/documentation/videos/for-developers/foundation/using-net-user-controls.

    Hope that helps,
    Sascha

  • tesuji 95 posts 139 karma points
    Aug 17, 2010 @ 16:49
    tesuji
    0

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft