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 = "[email protected]"
C.
Wizard1.MailDefinition.From = "[email protected]"
D.
SmtpMail.SmtpServer = "mail.contoso.com"
Explanation:
Answer A is more correct than Answer C because you can set the ‘From’ attribute with in the element of the web.config file. However you do need to make the user enter his email so you can confirm registration. Therefore we need to set the RequiredEmail property of the wizard to true.