Copied to clipboard

Flag this post as spam?

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


  • Chris 69 posts 75 karma points
    Jan 23, 2010 @ 21:10
    Chris
    0

    Multilingual LoginView control

    Hi,

    I am using the asp.net loginview control inside a template and would like to make it multilingual using dictionary items.

    This is the code inside the Login template:

    <asp:LoginView ID="UmbracoLoginView" runat="server">
                <AnonymousTemplate>
                        <div id="loginbox">
                <asp:Login ID="Login1" runat="server"
                    EnableTheming="False"
                    DisplayRememberMe="False"
                    PasswordLabelText="Password"
                    UserNameLabelText="User name"
                    TitleText=""
                    width="400px"></asp:Login>
                </div>
            </AnonymousTemplate>
                <LoggedInTemplate>
                        <p><asp:LoginStatus ID="LoginStatus1" runat="server" /></p>
                <umbraco:Item field="MainContent" runat="server"></umbraco:Item>
                </LoggedInTemplate>
        </asp:LoginView>

     

    What I want to do is fill out the "PasswordLabelText" and "UserNameLabelText" with a dictionary item. What would be my best approach to do this (since we are inside a server control)?

    Thanks in advance!

    Chris

     

  • Kenneth Solberg 227 posts 418 karma points
    Jan 23, 2010 @ 21:20
    Kenneth Solberg
    1

    I usually click the Login task menu on the control in design view and select 'Convert to Template' to get full control of the markup. Here you can use the umbraco:item control as usual to insert dictionary items.

  • Chris 69 posts 75 karma points
    Jan 23, 2010 @ 21:41
    Chris
    0

    Thanks Kenneth!

    That's a great tip! Not only did it solve my problem, but now i can also remove the dreadful visual studio markup. :)

  • fedar 10 posts 30 karma points
    Dec 17, 2011 @ 21:58
    fedar
    0

    Hi

    I am having the same problem and I do not understand the solution you suggested Kenneth.
    Can you post the code as you stay in umbraco.?

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 19, 2011 @ 14:27
    Tom Fulton
    0

    Hi fedar,

    If you don't want to use Visual Studio but want full control over the login markup, you can try this package:  RazorLogin - which renders a login form in Razor using standard HTML controls which you can change.  You could also use Razor to insert items from the dictionary.

    You could also check out the uLogin source if you want to use Visual Studio.

    -Tom

  • fedar 10 posts 30 karma points
    Dec 19, 2011 @ 16:38
    fedar
    0

    Thanks Tom.
      I'll try


Please Sign in or register to post replies

Write your reply to:

Draft