LoginView - Roles and Common Stuff

G

Guest

Hello All,

Is there a way to show common "stuff" in the LoginView for all logged in
users when using <RoleGroups>?

In other words, I have a number of links that all users that log in should
see. There are additional links special to particular roles. It appears
that I need to do something like (plus usual parameters like runat="server"):

<asp:LoginView>
<AnonymousTemplate>You are not logged in</AnonymousTemplate>
<RoleGroups>
<asp:RoleGroup Roles="RegularUser">
<ContentTemplate>
<asp:HyperLink NavigateUrl="~/Common1.aspx">Common Link #1</asp:HyperLink>
<asp:HyperLink NavigateUrl="~/Common2.aspx">Common Link #2</asp:HyperLink>
</ContentTemplate>
</asp:RoleGroup>
</RoleGroups>
<ContentTemplate>
<asp:RoleGroup Roles="Administrator">
<asp:HyperLink NavigateUrl="~/Common1.aspx">Common Link #1</asp:HyperLink>
<asp:HyperLink NavigateUrl="~/Common2.aspx">Common Link #2</asp:HyperLink>
<asp:HyperLink NavigateUrl="~/AdminOnly.aspx">Admin Only
Link</asp:HyperLink>
</asp:RoleGroup>
</ContentTemplate>
</RoleGroups>
</asp:LoginView>

It seems silly (and error-prone) to have to put the "Common Link #1" and
"Common Link #2" into both RoleGroups. Isn't there a better way?

Thanks,
pagates
 

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,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top