The project is a default ASP.net Website built in vs 2010. I am new to asp.net and was just experimenting with the master page to only show a menu when logged in.
I have the following in the master page.
<asp:LoginView ID="MenuLoginView" runat="server" EnableViewState="false">
<asp:LoggedinTemplate>
<asp:Label runat="server" Text="TESTING"></asp:Label>
<asp:Menu ID="NavigationMenu1" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/>
<asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/>
<asp:MenuItem NavigateUrl="~/Courselist.aspx" Text="About"/>
</Items>
</asp:Menu>
</asp:LoggedinTemplate>
<AnonymousTemplate>
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/>
<asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/>
</Items>
</asp:Menu>
</AnonymousTemplate>
</asp:LoginView>
The AnonymousTemplate works fine. However when I log into my user the entire menu disappears. I have searched the web and the results were to look at my web config auth tag which looks like this.
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>
What am I doing wrong?
PS. I have also tried to set the MENU IDS to the same name and that is not working either.
Thanks in advance.