469,626 Members | 1,279 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

Binding to Roles.GetRolesForUser

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.

Sep 13 '07 #1
1 1545
Have <%# Container.DataItem %>

"mazdotnet" wrote:
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.

Sep 13 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Steven Blair | last post: by
1 post views Thread by xeroxero | last post: by
4 posts views Thread by AC | last post: by
1 post views Thread by mazdotnet | last post: by
2 posts views Thread by Jonathan Wood | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.