Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 30, 2012 03:28 PM by jypelton
Member
153 Points
154 Posts
Nov 29, 2012 08:08 PM|LINK
How would I order this by username...
gvUsers.DataSource = FindUsersByRole(new string[] { "role1","role2","role3" });
Participant
776 Points
158 Posts
Nov 29, 2012 08:11 PM|LINK
What is FindUsersByRole? is that a function? a stored proc? can we see the code?
Nov 29, 2012 08:22 PM|LINK
Its built in c# method used with the sqlmembership provider. There's no other code to show really.
http://msdn.microsoft.com/en-us/library/system.web.security.roleprovider.findusersinrole.aspx
Nov 29, 2012 08:33 PM|LINK
Reading the link you posted, it says "Users are returned in alphabetical order by user name."
Nov 29, 2012 09:15 PM|LINK
Thanks. Its alphabetized within role. So role1 is returned alphabetically, then role2, then role3. I need the entire list to be alphabetized as a whole.
Nov 30, 2012 03:28 PM|LINK
I'm writing the results of each role group to a string array and then ordering that.
jypelton
Member
153 Points
154 Posts
Order list of users
Nov 29, 2012 08:08 PM|LINK
How would I order this by username...
gvUsers.DataSource = FindUsersByRole(new string[] { "role1","role2","role3" });
msmk
Participant
776 Points
158 Posts
Re: Order list of users
Nov 29, 2012 08:11 PM|LINK
What is FindUsersByRole? is that a function? a stored proc? can we see the code?
jypelton
Member
153 Points
154 Posts
Re: Order list of users
Nov 29, 2012 08:22 PM|LINK
Its built in c# method used with the sqlmembership provider. There's no other code to show really.
http://msdn.microsoft.com/en-us/library/system.web.security.roleprovider.findusersinrole.aspx
msmk
Participant
776 Points
158 Posts
Re: Order list of users
Nov 29, 2012 08:33 PM|LINK
Reading the link you posted, it says "Users are returned in alphabetical order by user name."
jypelton
Member
153 Points
154 Posts
Re: Order list of users
Nov 29, 2012 09:15 PM|LINK
Thanks. Its alphabetized within role. So role1 is returned alphabetically, then role2, then role3. I need the entire list to be alphabetized as a whole.
jypelton
Member
153 Points
154 Posts
Re: Order list of users
Nov 30, 2012 03:28 PM|LINK
I'm writing the results of each role group to a string array and then ordering that.