Binding to Roles.GetRolesForUser

  • Thread starter Thread starter mazdotnet
  • Start date Start date
M

mazdotnet

Hi,

I have a GridView that I want to bind user roles to


gvUserRoles.DataSource = Roles.GetRolesForUser("Username");
gvUserRoles.DataBind();


How can access the roles using


<asp:GridView ID="gvUserRoles" runat="server"
AutoGenerateColumns="false">
<Columns>
<asp:TemplateField HeaderText="Roles">
<ItemTemplate>
Something like this???? <%#
Eval("RoleName")%>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>


Thanks
M.
 
Back
Top