Copied to clipboard

Flag this post as spam?

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


  • Rachel Skuse 88 posts 118 karma points
    Mar 01, 2010 @ 17:40
    Rachel Skuse
    0

    Is it possible to use properties in a DocType to update a usercontrol?

    Hi,

    (Sorry, I've reposted this as my original topic was confusing doctypes with datatypes - it's been a long day!)

    I've just watched the video 'Databinding published content' and I was wondering if I can do a similar thing with properties created in a datatype?

    For eg. I have the following in a .Net usercontrol

    <asp:Panel ID="pnlKeyProductFeatures" runat="server" Visible="true">
                           
    <h1>Key Product Features</h1>
                           
    <ul>
                               
    <li></li>
                               
    <li></li>
                           
    </ul>
                   
    </asp:Panel>

     

    and I want to be able to populate the list items using

    <umbraco:Item field="listItem1" runat="server"></umbraco:Item>

     

    Is there a way to do this?

    Thanks,

    Rachel

     

  • Ron Brouwer 273 posts 768 karma points
    Mar 01, 2010 @ 18:55
    Ron Brouwer
    0

    Hi Rachel,

    Can you be a litle bit more specific about what you'r trying to do.

    Ron

  • Ranjit J. Vaity 58 posts 101 karma points
    Mar 01, 2010 @ 19:32
    Ranjit J. Vaity
    0

    Hi Rachel,

    Please check out the link below:

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

    This explains how you can go about creating your own datatype.

     

    Cheers,

    Ranjit J. Vaity 

     

  • Rachel Skuse 88 posts 118 karma points
    Mar 02, 2010 @ 15:13
    Rachel Skuse
    0

    Hi,

    Basically what I want to be able to do is pass a parameter to a UserControl, without it being hardcoded. I think I can do something like

    <umbraco:Macro Alias="userControl" parameter=[#parameter] runat="server"></umbraco:Macro>

    But do I then need to specify that parameter in a DocType?

    Thanks,
    Rachel

  • Ranjit J. Vaity 58 posts 101 karma points
    Mar 02, 2010 @ 15:27
    Ranjit J. Vaity
    0

    hi Rachel,

    Yes you will have to create a property in that particular document type, later when you create actual page using that document type. You will be allowed to provide data to that property. Each page you create of that particular doc type, you can set values to it - remember those values will be only bound to that particular page.  

    Ranjit J. Vaity

  • Rachel Skuse 88 posts 118 karma points
    Mar 02, 2010 @ 16:28
    Rachel Skuse
    0

    Thanks for your help Ranjit

  • 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