views:

43

answers:

1

We are using the standard aspnet security features, we have need to set the order of the roles, purely for display purposes.

We could just have a sequence number onto the end of the aspnet_roles table, but that feels kinds of hacky to me. Also if in future versions of asp the security get changed we will be in trouble.

Is there a better way to do this that won't make me loose sleep each time a new version is pushed out?

A: 

If you don't want to change the existing schema, store the sequence data in another table and use a custom stored procedure to join the two together and return the values. Use the result of this stored procedure to populate the drop-down.

Don't forget to add a "special case" in the stored procedure to place roles that aren't contained in the second table at a "default" position in the returned set, rather than ignoring them, unless that's desired =)

Rob