How do I implement a custom method for my SQL role provider? Or overwrite an existing one?

144 views Asked by At

I'm using ASP.NET's role provider, and everything is working swell. On my role administration screen, however, I'd like to show not just the names of existing roles, but their descriptions as well. The field exists in SQL table generated by the aspnet_regsql.exe utility, but there doesn't appear to be anything in the System.Web.Security namespace that references the field.

Currently, Roles.GetAllRoles() returns a string array containing the role names. I'd like to be able to return a List of ListItem, for example (to keep things simple). Or when creating a new role, I'd like to be able to set the description to something, rather than it to default to null.

I know I could just write a stored procedure to return the results I want and use a completely separate method. But I'd prefer if I could just derive something from the base and extend it to suit my needs. Is that possible?

0

There are 0 answers