单项选择题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 = tr ue;
B. Wizard1.Email = “user@address.com”;
C. Wizard1.MailDefinition.From = “registration@mysite.com”;
D. SmtpMail.SmtpServer = “ mail.contoso.com”;


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题You create an intranet Web site for management of project documents. You need to enable all users to browse documents on the site. Only members of the administrators group must be able to upload files. Which code segment of the Web.config file should you use? ()

A. <allow verbs="GET" users="*" /><deny verbs="POST" users="*" /><allow verbs="POST" roles="Administrators" />
B. <allow role s="Administrators" /><deny users="*" />
C. <allow u sers="Administrators" /><allow users="*" />
D. <allow v erbs = "POST" roles="Administrators" /><deny verbs="POST" users="*" /><allow verbs="GET" users="*" />

2.单项选择题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);

3.单项选择题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.

4.多项选择题You create a Web Form. The Web Form allows users to recover their passwords. You add a PasswordRecovery server control by using the following code segment.You need to ensure that the server control generates a new password and sends it by e-mail to the users e?mail address. Which two actions should you perform?()

A. Create a valid definition in the Web.config file.
B. Set the passwordFormat attribute of the configured membership provider to Encrypted.
C. Ensure that the enablePasswordRetrieval attribute of the configured membership provider is set to False.
D. Ensure that the enablePasswordRetrieval attribute of the configured membership provider is set to True.

6.多项选择题You are creating a custom user control. The custom user control will be used on 10 Web Forms for an ASP.NET Web site that allows users to register and log on to a personalized experience. The custom user control uses two TextBox controls and two Button controls. You need to ensure that the controls are visible only when users are not logged on to the Web site. You also need to minimize the amount of effort in development and maintenance for the Web site. Which two actions should you perform? ()

A. Add the OnClick event handler for the Login button to the code used in the custom user control.
B. Add the OnClick event handler for the Login button to the code used in the Web Form where the control is added.
C. In the Page_Load method of the Web Form, add a code segment to set the visibility of the TextBox and Button controls where the control is added.
D. In the Page_Load method of the custom user control, add a code segment to set the visibility of the TextBox and Button controls.

7.多项选择题You are developing a Web application to display products. Products are displayed on different pages on your Web site. You want to create a user control to manage the display of products. You need a default visual implementation of the UI of the user control. In addition, you need to provide developers with the flexibility to change the layout and controls of the UI. Which three actions should you perform? ()

A. Apply the TemplateContainerAttribute to a property of type ITemplate. Pass the type of the template's naming container as the argument to the attribute.
B. Apply the TemplateContainerAttribute to the user control's class declaration.
C. Implement a property of type INamingContainer in the user control's code-behind class.
D. Implement a property of type ITemplate in the user control's code-behind class.
E. Define a new class that inherits from the ITemplate interface. Implement the InstantiateIn method of the ITemplate interface.

8.单项选择题You develop a Web control. The Web control consists of labels and associated text boxes. You need to ensure that the Web control has both toolbox and visual designer support. What should you do? ()

A. Add a Web Control Library project to your solution. Define a class that inherits from CompositeControl.
B. Add a Windows Control Library project to your solution. Define a class that inherits from UserControl.
C. Add a Web User Control to your project. Define a class that inherits from UserControl.
D. Add a Mobile Web User Control to your project. Define a class that inherits from MobileUserControl.


9.多项选择题You create a control named ContosoUI for a Web application. You need to add the control to the toolbox of Microsoft Visual Studio .NET. Which two actions should you perform?()

A. Create the ContosoUI control as a Web Control Library.
B. Create the ContosoUI control as a Web user control.
C. Within the Visual Studio .NET toolbox, browse to and select ContosoUI.ascx.
D. Within the Visual Studio .NET toolbox, browse to and select ContosoUI.dll.

10.多项选择题

Exhibit:

You are creating a composite control for capturing user address information in a Web application. You define a number of properties that the user can set at design time. You need to group these properties in the Properties dialog box. In addition, you need to ensure that when users click on a particular property, they receive a short explanation of that property. The properties are shown in the exhibit. Which two actions should you perform?()

A. Attach the Category attribute class to the controls class definition. Set its value to UserAddress. Mark the class as public.
B. Attach the Browsable attribute class to each property in the group. Set its value to True. Mark the property as private.
C. Attach the Category attribute class to each property in the group. Set its value to UserAddress. Mark the property as public.
D. Attach the Description attribute class to each property in the group. Set each value to a description of the given property.
E. Attach the DefaultProperty attribute class to each property in the group. Set each value to a description of the given property.

最新试题

You create a Web site that stores users' active themes in user profile objects. You need to apply users' preferred themes when they log on to the Web site.What should you do? ()

题型:单项选择题

You create a Web application. The Web application enables users to change fields in their personal profiles. Some of the changes are not persisting in the database. You need to raise a custom event to track each change that is made to a user profile so that you can locate the error.Which event should you use? ()

题型:单项选择题

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?()

题型:单项选择题

You create a Web Form. You need to add controls that use adaptive rendering to display content. The type of content rendered must depend on the device that is requesting the page.What are two possible ways to achieve this goal? ()

题型:多项选择题

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?()

题型:单项选择题

You create a Web site. The Web site has many predefined roles and associated users that will be used for security purposes. You need to manage these roles and user accounts.Which tool should you use? ()

题型:单项选择题

ou are developing a chat forum for the Certkiller .com Web site. You are using ASP.NET 2.0 to develop the chat forum. You are developing a Web Form that allows a subscriber to alter enter their account details. The page contains the following code snippet.You need to programmatically hide the TextBox control based on other input.What should you do?()

题型:单项选择题

You are creating a composite control for capturing user address information in a Web application. You define a number of properties that the user can set at design time. You need to group these properties in the Properties dialog box. In addition, you need to ensure that when users click on a particular property, they receive a short explanation of that property. The properties are shown in the exhibit.Which two actions should you perform?()

题型:多项选择题

You create a large, n-tier Web application that has a custom event tracking system. You need to create a custom event type that enables your event tracking system to record all relevant event details for all types of events. The events must be stored in Microsoft SQL Server.From which base type should your custom event type inherit? ()

题型:单项选择题

You are creating a Web application that will run on an intranet. The Web application reads comma-delimited text files. The text files reside in a subdirectory below the Web application's root directory. Users must not be able to navigate directly to these files in a Web browser unless they are members of the Accounting role. You need to write an ASP.NET HTTP handler that will use the FileAuthorizationModule class.Which form of authentication should you use?()

题型:单项选择题