I use asp.net LoginView to display different data for authenticated or anonymous users.
<asp:LoginView ID="LoginView1" Runat="server">
<LoggedInTemplate>
<asp:Label ID="Foo" runat="server" />
</LoggedInTemplate>
<AnonymousTemplate>
<asp:Label ID="Bar" runat="server" />
</AnonymousTemplate>
</asp:LoginView>
When I moved Fooand Barto LoginView1, I could not access them from code located in this way:
Foo.Text = "I am Foo";
Bar.Text = "I am Bar";
I was able to access them this way before moving them to LoginView. What (clean) method can I use to access these tags?
source
share