Copied to clipboard

Flag this post as spam?

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


  • Julius Bartkus 51 posts 76 karma points
    Sep 28, 2009 @ 02:59
    Julius Bartkus
    0

    dictionary item into asp:login control

    Hello all,

    In the template I was trying to insert a Dictionary item but with no luck:

    <asp:Login
                ID="Login1"
                runat="server"
                LoginButtonText="<umbraco:Item field='#loginButton' runat='server'></umbraco:Item>">
    </asp:Login>

    Any suggestions how could it be solved?

    Thanks.

     

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Sep 28, 2009 @ 06:17
    Richard Soeteman
    0

    Hi,

    What I usually do is creating a usercontrol the I place the logincontrol onto that usercontrol and use the usercontrol as a Macro. Then you can change the loginbutton text by.

     

    protected void Page_Load(object sender, EventArgs e)

    {

    Login1.LoginButtonText.Text = umbraco.

    library.GetDictionaryItem("loginButton");

    }

    Hope it helps you,

    Richard

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 28, 2009 @ 08:59
    Dirk De Grave
    2

    Or if you don't want the hassle of creating the user control as Richard is suggesting, you could write this piece of code into the template that contains the login control

    <script runat="server">
    protected void Page_Load(object sender, EventArgs e) {  
       Login1.LoginButtonText.Text = umbraco.library.GetDictionaryItem("loginButton");
    }
    </script>

     

    Cheers,

    /Dirk

  • Julius Bartkus 51 posts 76 karma points
    Sep 28, 2009 @ 14:46
    Julius Bartkus
    0

    Thanks!:)

Please Sign in or register to post replies

Write your reply to:

Draft