about LoginView control usage when a user in more than one user group

S

Sinan Alkan

Hi All.

I have three user role groups
Admin
B2B
B2C

Some users are in more than one group. Assume that user XXX is in both Admin
and B2B role groups.

My problem is, in a LoginView control, if i use <asp:RoleGroup> for all user
group one by one, like that...

<RoleGroups>
<asp:RoleGroup Roles="Admin">
<ContentTemplate>
<asp:Button ID="Button1" runat="server" Text="aaaa" />
</ContentTemplate>
</asp:RoleGroup>
<asp:RoleGroup Roles="B2B">
<ContentTemplate>
<asp:Button ID="Button2" runat="server" Text="bbbb" />
</ContentTemplate>
</asp:RoleGroup>
<asp:RoleGroup Roles="B2C">
<ContentTemplate>
<asp:Button ID="Button3" runat="server" Text="cccc" />
</ContentTemplate>
</asp:RoleGroup>

the loginview control shows only the first button (Button1) for user XXX but
that user also in B2B group.
If i set roles like

<asp:RoleGroup Roles="Admin,B2B">
<ContentTemplate>
<asp:Button ID="Button1" runat="server" Text="aaaa" />
<asp:Button ID="Button2" runat="server" Text="bbbb" />
</ContentTemplate>
</asp:RoleGroup>
<asp:RoleGroup Roles="B2C">
<ContentTemplate>
<asp:Button ID="Button3" runat="server" Text="cccc" />
</ContentTemplate>
</asp:RoleGroup>

this time, the other B2B users which are not in Admin group simultaneously
can see the Button1 not just Button2

How can i set the <RoleGroups> section to show the both controls Button1 and
Button2 to users which are in Admin and B2B
And just Button2 for the only users which are only in B2B group, so on ...
Button3 for B2C group....


Thanks in advance..

ALKAN
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top