在运行时在asp.net中设置角色 [英] setting roles at runtime in asp.net
本文介绍了在运行时在asp.net中设置角色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用代码在asp.net中设置新角色?
还有如何使用代码检查可用的不同角色?
帮帮我.
提前致谢.
How do I set new roles in asp.net using code?
Also how to check different roles available using code?
Help me.
Thanks in Advance.
推荐答案
假设您正在使用成员资格提供程序和角色提供程序,请查看CreateRole和AddUsersToRole方法-谷歌会找到它们.
Assuming you are using a Membership Provider and a Role Provider, look at the CreateRole and AddUsersToRole methods - google will find them.
尝试
了解角色管理 [
Try
Understanding Role Management[^]
这篇关于在运行时在asp.net中设置角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文