Copied to clipboard

Flag this post as spam?

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


  • Fabian van der Spek 1 post 21 karma points
    Feb 23, 2010 @ 08:57
    Fabian van der Spek
    0

    How to use a .Net web usercontrol for the Metatags

    Hello,

    In exploring the possibilities of Umbraco we do not succeed in implementing a .Net web usercontrol.

    We have a usercontrol with a textbox and a button, that writes the output to a string: the Keywords-metatag. We have made a contentPlaceHolder in the head-section of a MasterPage.

    We have followed the instructions as described on http://www.nibble.be/?p=24 and want the output to appear in the content-tag in the page.

    We have added our new datatype 'MetaTags' to a tab, but how do we go along from here?

    Is it possible to use any .Net usercontrol and have its output, whether a Gridview or plane HTML-code, placed in a ContenPlaceHolder?

     

    Thanks in advance,

     

    Fabian

     

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Feb 23, 2010 @ 09:54
    Dirk De Grave
    0

    Hi Fabian,

    Maybe this thread may help you. You don't actually need to create your own datatype, a simple text string property should do fine for this, altho nothing prevents you from using your own datatype. Syntax for using your own property will be identical.

     

    Cheers,

    /Dirk

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Feb 23, 2010 @ 09:56
    Lee Kelleher
    0

    Hi Fabian,

    To my knowledge, as long as your user-control is derived from the "umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor" interface - and the content/string/value is available via the "value" property ... yes it should work with the User Control Wrapper data-type.

    With that said, I have experienced a few problems with the User Control Wrapper ... and ended up writing a custom data-type, as per one of Nibble's other blog posts - using the "umbraco.cms.businesslogic.datatype.AbstractDataEditor" abstract class.

    http://www.nibble.be/?p=62

     

    Alternatively, you could consider using the default Tags data-type for your Meta Keywords property?

    Good luck, Lee.

  • 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