Mega Code Archive

 
Categories / ASP.Net Tutorial / Authentication Authorization
 

Providing a view for a particular group

<%@ Page Language="C#" %> <html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server">     <title>Changing the View</title> </head> <body>     <form id="form1" runat="server">         <asp:LoginStatus ID="LoginStatus1" Runat="server" />                  <asp:LoginView ID="LoginView1" Runat="server">             <LoggedInTemplate>                 REALLY important              </LoggedInTemplate>             <AnonymousTemplate>                 basic information              </AnonymousTemplate>             <RoleGroups>                 <asp:RoleGroup Roles="Admins">                     <ContentTemplate>                        You are an Admin!                     </ContentTemplate>                 </asp:RoleGroup>                 <asp:RoleGroup Roles="CoolPeople">                     <ContentTemplate>                        You are cool!                     </ContentTemplate>                 </asp:RoleGroup>             </RoleGroups>         </asp:LoginView>     </form> </body> </html>