Hello All,
I have a menu in which items within it should display depending on the role assigned. In the code below all roles should see the "Forms" option, and then, depending on the role, they should see "Admission", "Service", "Treatment", or "Discharge", only the Administrator should see ALL options. The problem I'm having is that when I log in as the Administrator to test it I see the "Forms" option, but in the sub menu (which should display the other 4 options) it only appears the very last one of them (Discharge). I tried commenting the options (one by one, or more that one at a time) and the problem is always the same, the sub menu only displays the last coded option. I'm kind of new at creating a menu that depends on the role so I'm not sure if I'm missing something or doing something wrong. Any help will be greatly appreciated.
Luis Torres
I have a menu in which items within it should display depending on the role assigned. In the code below all roles should see the "Forms" option, and then, depending on the role, they should see "Admission", "Service", "Treatment", or "Discharge", only the Administrator should see ALL options. The problem I'm having is that when I log in as the Administrator to test it I see the "Forms" option, but in the sub menu (which should display the other 4 options) it only appears the very last one of them (Discharge). I tried commenting the options (one by one, or more that one at a time) and the problem is always the same, the sub menu only displays the last coded option. I'm kind of new at creating a menu that depends on the role so I'm not sure if I'm missing something or doing something wrong. Any help will be greatly appreciated.
Luis Torres
Code:
<asp:LoginView ID="LoginView_FormsMenu"
runat="server" >
<RoleGroups>
<asp:RoleGroup Roles="Administrator,Admission,Discharge,Service,Treatment">
<ContentTemplate>
<div class="Menu_Container">
<ul>
<li>
<a href="#nogo">Forms</a>
<asp:LoginView ID="LoginView_Admission"
runat="server">
<RoleGroups>
<asp:RoleGroup Roles="Administrator,Admission">
<ContentTemplate>
<div>
<ul>
<li>
<a href="#nogo">Admission</a>
</li>
</ul>
</div>
</ContentTemplate>
</asp:RoleGroup>
</RoleGroups>
</asp:LoginView>
<asp:LoginView ID="LoginView_Treatment"
runat="server">
<RoleGroups>
<asp:RoleGroup Roles="Administrator,Treatment">
<ContentTemplate>
<div>
<ul>
<li>
<a href="#nogo">Treatment</a>
</li>
</ul>
</div>
</ContentTemplate>
</asp:RoleGroup>
</RoleGroups>
</asp:LoginView>
<asp:LoginView ID="LoginView_Service"
runat="server">
<RoleGroups>
<asp:RoleGroup Roles="Administrator,Service">
<ContentTemplate>
<div>
<ul>
<li>
<a href="#nogo">Service</a>
</li>
</ul>
</div>
</ContentTemplate>
</asp:RoleGroup>
</RoleGroups>
</asp:LoginView>
<asp:LoginView ID="LoginView_Discharge"
runat="server">
<RoleGroups>
<asp:RoleGroup Roles="Administrator,Discharge">
<ContentTemplate>
<div>
<ul>
<li>
<a href="#nogo">Discharge</a>
</li>
</ul>
</div>
</ContentTemplate>
</asp:RoleGroup>
</RoleGroups>
</asp:LoginView>
</li>
</ul>
</div>
</ContentTemplate>
</asp:RoleGroup>
</RoleGroups>
</asp:LoginView>