<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
<AnonymousTemplate>
[ <a href="~/Account/Login.aspx" ID="HeadLoginStatus" runat="server">Log In</a> ]
</AnonymousTemplate>
<LoggedInTemplate>
Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" />,
You're <asp:Label ID="AgeLabel" runat="server" Text="Label"> </asp:Label></span>!
[ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ]
</LoggedInTemplate>
</asp:LoginView>
I want to do something like
AgeLabel.Text = Profile.GetPropertyValue("Age").ToString();
How can I do this? AgeLabel i inside a template so it looks like I can't refference it in
Have you tried following?
Otherwise you could access the Label from Codebehind with FindControl: