当前位置:在线题库搜索>[单选题]You create a Web site that is for members only. The Web site allows members to create lists of users that have access to information about member profiles. The name of the list is stored in the listName variable. The user name of the user to whom access is given is stored in the username variable. You need to enable members to manage their lists of users. Which code segment should you use? ()的答案是什么?

问题:

[单选题]You create a Web site that is for members only. The Web site allows members to create lists of users that have access to information about member profiles. The name of the list is stored in the listName variable. The user name of the user to whom access is given is stored in the username variable. You need to enable members to manage their lists of users. Which code segment should you use? ()

A、Roles.CreateRole(listName);User.InInRole(listName);
B、Roles.CreateRole(listName);Roles.AddUserToRole(useName, listName);
C、Roles.RoleExists(listName);Roles.AddUserToRole(useName, listName);
D、Roles.RoleExists(listName);User.InInRole(listName)

参考答案: B

相关内容