Copied to clipboard

Flag this post as spam?

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


  • kukuwka 75 posts 96 karma points
    Sep 21, 2010 @ 14:50
    kukuwka
    0

    How to put attribute visible to asp control using "Item field"

    Hi,

    How can I put attribute visible to asp control using :

     

    <umbraco:Item field="pageId" runat="server" ></umbraco:Item>;

     

    Something like:

    <asp:Button ID-btnOpen" runat="server" visible="<umbraco:Item field="pageId" runat="server" ></umbraco:Item>==1055 ?true :false" />

     Thanks,

    kukuwka

  • Claus Jensen 49 posts 157 karma points hq
    Nov 24, 2010 @ 01:42
    Claus Jensen
    0

    Well I don't believe you can. You can however do what you're trying to do by putting this in your codebehind of the masterpage:

       protected void Page_PreRender(object sender, EventArgs e)

        {

            btnOpen.Visible = Node.GetCurrent().Id == 1055 ? true : false;

        }

     

    Hope it does what you need?

    -Claus

     

Please Sign in or register to post replies

Write your reply to:

Draft