单项选择题
You create a Web Form that allows users to create a new account. You add a CreateUserWizard control by using the following code segment. You need to ensure that the wizard automatically sends an e-mail message to users when they finish creating their accounts. You add a valid element to the Web.config file. Which code segment should you add to the Page_Load event? ()
A. Wizard1.RequireEmail = True
B. Wizard1.Email = "user@address.com"
C. Wizard1.MailDefinition.From = "registration@mysite.com"
D. SmtpMail.SmtpServer = "mail.contoso.com"
相关考题
-
单项选择题
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.IsInRole(listName)
B. Roles.CreateRole(listName)Roles.AddUserToRole(userName, listName)
C. Roles.RoleExists(listName)Roles.AddUserToRole(userName, listName)
D. Roles.RoleExists(listName)User.IsInRole(listName) -
单项选择题
You create a Web site with membership and personalization enabled. You must use an existing CRM database for storing the membership information. You need to implement the Membership Provider. What should you do? ()
A. Modify the connection string in the Web.config file to connect to the CRM database.
B. Add new a SqlMembershipProvider to the Web.config file.
C. Create a custom Membership Provider inheriting from MembershipProvider.
D. Create a custom MembershipUser inheriting from MembershipUser. -
单项选择题
You deploy your companys Internet Web site. You need to deny anonymous access to the Web site, allowing only authenticated users. Which code segment should you use?()
A. <authorization> <allow users="?"/> </authorization>
B. <authorization> <deny users="?"/> </authorization>
C. <authorization> <deny users="*"/></authorization>
D. <authorization> <allow users="*"/> </authorization>
