Adding checkbox controls to list box

Viewed 52162

I'm new to .NET environment and just a student. I'm working on User Management. I want to assign multiple roles to one user. For this purpose I've created list box which contains a list of roles from database.

 lbRoles.Items.Add(readerRole["RoleName"].ToString());

I just need a check box with each item. Please suggest how to add a checkbox with each item. I did tried

lbRoles.Controls.Add(checkBox);
lbRoles.Items.Add(readerRole["RoleName"].ToString());

But it was not helpful. I did google but no result :(

2 Answers
Related