Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I would like to set he UserNameLabelText property and the PasswordLabelText property of the asp:Login control to the value of a dictionary item. How can I do this?
I've found two options:You can utilize <LayoutTemplate> within the asp:Login login control as described in the following link: http://our.umbraco.org/forum/developers/api-questions/6651-Multilingual-LoginView-control
OR
Here is an example where I wrote code in a template to update a property within within the asp:LoginStatus control:
<script runat="server"> protected void Page_Load(object sender, EventArgs e) { LoginStatus LoginStatusControl = (LoginStatus)LoginView1.FindControl("LoginStatus1"); LoginStatusControl.LoginText = umbraco.library.GetDictionaryItem("Login"); }</script>
<asp:LoginView id="LoginView1" runat="server"> <AnonymousTemplate> <li><asp:LoginStatus id="LoginStatus1" runat="server"></asp:LoginStatus></li> <li><a href="/Register.aspx"><umbraco:Item field="#Register" runat="server"></umbraco:Item></a></li> </AnonymousTemplate> <LoggedInTemplate> <li>Thanks for logging in <asp:LoginName id="LoginName1" runat="Server"></asp:LoginName></li> <li><a href="/UpdateProfile.aspx">Update Profile</a></li> <li><asp:LoginStatus id="LoginStatus1" runat="server"></asp:LoginStatus></li> </LoggedInTemplate> </asp:LoginView>
is working on a reply...
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.
Continue discussion
how to pass the value of a dictionary item within asp:Login control
I would like to set he UserNameLabelText property and the PasswordLabelText property of the asp:Login control to the value of a dictionary item. How can I do this?
I've found two options:
You can utilize <LayoutTemplate> within the asp:Login login control as described in the following link: http://our.umbraco.org/forum/developers/api-questions/6651-Multilingual-LoginView-control
OR
Here is an example where I wrote code in a template to update a property within within the asp:LoginStatus control:
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
LoginStatus LoginStatusControl = (LoginStatus)LoginView1.FindControl("LoginStatus1");
LoginStatusControl.LoginText = umbraco.library.GetDictionaryItem("Login");
}
</script>
<asp:LoginView id="LoginView1" runat="server">
<AnonymousTemplate>
<li><asp:LoginStatus id="LoginStatus1" runat="server"></asp:LoginStatus></li>
<li><a href="/Register.aspx"><umbraco:Item field="#Register" runat="server"></umbraco:Item></a></li>
</AnonymousTemplate>
<LoggedInTemplate>
<li>Thanks for logging in <asp:LoginName id="LoginName1" runat="Server"></asp:LoginName></li>
<li><a href="/UpdateProfile.aspx">Update Profile</a></li>
<li><asp:LoginStatus id="LoginStatus1" runat="server"></asp:LoginStatus></li>
</LoggedInTemplate>
</asp:LoginView>
is working on a reply...
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.