kwilliams Posted November 30, 2009 Share Posted November 30, 2009 I need to know if you can nest a datalist within a LoginView's RoleGroup. I have two separate datalists, and I want to show one for admin users, and another for dept-specific users using ASP.NET Membership. Here is what I have: <asp:LoginView ID="LoginView1" runat="server"> <LoggedInTemplate> Below is a list of jobs: </LoggedInTemplate> <RoleGroups> <asp:RoleGroup Roles="Public Works"> <ContentTemplate> <!-- DEPT-SPECIFIC DATALIST GOES HERE --> <asp:DataList ID="dlJobs_depts" runat="server"> <ItemTemplate><asp:Label ID="lblJobTitle" runat="server" /></ItemTemplate> </asp:DataList> </ContentTemplate> </asp:RoleGroup> <asp:RoleGroup Roles="Power Admin"> <ContentTemplate> <!-- ADMIN DATALIST GOES HERE --> <asp:DataList ID="dlJobs_admin" runat="server"> <ItemTemplate><asp:Label ID="lblJobTitle" runat="server" /></ItemTemplate> </asp:DataList> </ContentTemplate> </asp:RoleGroup> </RoleGroups> </asp:LoginView> And this is the resulting error: Compiler Error Message: BC30451: Name 'dlJobs_admin' is not declared.So my questions are: * Is there a way to do this? * If not, what would be an alternative? * If so, what am I doing wrong?Thanks for any and all help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.