I'm trying to create a page where a listbox will contain all my ASP.NET users.
However I'm having a lot of problems attempting to make the Html.Listbox accept the list of users.
I have tried doing this:
<%: Html.ListBox("Membershipusers", Membership.GetAllUsers())%>
and a zillion other approaches that is similar to this. I also have a method on my controller that looks like this:
public ActionResult getAllMembershipUsers()
{
MembershipUserCollection membershipusers = new MembershipUserCollection();
membershipusers = Membership.GetAllUsers();
return View(membershipusers);
}
It seems like it is able to create the list of users, but I still don't know how to show that list in my listbox.
Hope somebody can help me out here.