ASP.NET MVC Get a list of users with particular profile properties
Posted
by Sam Huggill
on Stack Overflow
See other posts from Stack Overflow
or by Sam Huggill
Published on 2010-04-11T13:45:47Z
Indexed on
2010/04/11
13:53 UTC
Read the original article
Hit count: 677
Hi, I'm using ASP.NET MVC 1 and I have added a custom Profile class using the WebProfile Builder VS add-in (found here: http://code.msdn.microsoft.com/WebProfileBuilder/Release/ProjectReleases.aspx?ReleaseId=980).
On one of my forms I want a drop-down list of all users who share a specific profile value in common.
I can see that I can get a list of all users using:
Membership.GetAllUsers()
However I cannot see how to get all users who have a specific profile value, which in my case is CellId.
Am I approaching this in the right way? I have used membership roles to define which users are administrators etc, but profiles seems like the right place to group users.
Any pointers both in specifics of how to access the user list but also comments on whether am I pursuing the right avenue here would be greatly appreciated.
Many thanks, Sam
© Stack Overflow or respective owner