R
RedEye
Hello,
I have been looking for a way to add roles to a LoginView control
programmatically and it's not working. I have called the sub at init and
load and neither work. Does anyone know what I may be over looking?
Thanks for any help
Private Sub AddRoles()
Dim rg As New RoleGroup
rg.Roles = New String() {"Members, Managers"}
LoginView1.RoleGroups.Add(rg)
End Sub
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>You are not logged in.</AnonymousTemplate>
<RoleGroups>
<asp:RoleGroup>
<ContentTemplate>
You see this if you are a member or manager
</ContentTemplate>
</asp:RoleGroup>
</RoleGroups>
<LoggedInTemplate>
Greetings and welcome back
</LoggedInTemplate>
</asp:LoginView>
RedEye
I have been looking for a way to add roles to a LoginView control
programmatically and it's not working. I have called the sub at init and
load and neither work. Does anyone know what I may be over looking?
Thanks for any help
Private Sub AddRoles()
Dim rg As New RoleGroup
rg.Roles = New String() {"Members, Managers"}
LoginView1.RoleGroups.Add(rg)
End Sub
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>You are not logged in.</AnonymousTemplate>
<RoleGroups>
<asp:RoleGroup>
<ContentTemplate>
You see this if you are a member or manager
</ContentTemplate>
</asp:RoleGroup>
</RoleGroups>
<LoggedInTemplate>
Greetings and welcome back
</LoggedInTemplate>
</asp:LoginView>
RedEye