单项选择题You create a master page named Article.master. Article.master serves as the template for articles on your Web site. The master page uses the following page directives. <%@ Master Language="VB" CodeFile="article.master.vb" Inherits="article" %> You need to create a content page that uses the master page as a template. In addition, you need to use a single master page for all devices that access the Web site. Which code segment should you use? ()

A. <%@ Page Language="VB" Theme="article"%>
B. <%@ Page Language="VB" MasterPageFile="~/article.master"%>
C. <%@ Page Language="VB" ie:MasterPageFile="~/article.master"%>
D. <%@Page Language="VB" all:MasterPageFile="~/article.master"%>


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题You develop a Web application that contains two master pages. You need to dynamically set the master page when a user views pages in the application. What should you do? ()

A. Set Page.MasterPageFile in the Page's Page_Init event.
B. Set Page.MasterPageFile in the Page's OnInit override.
C. Set Page.MasterPageFile in the Page's Page_Load event.
D. Set Page.MasterPageFile in the Page's Page_PreInit event.

2.单项选择题You create a master page named Template.master. Template.master contains the following ContentPlaceHolder server controls.You also create 10 Web Forms. The Web Forms reference Template.master as their master page. Each Web Form has the following Content controls that correspond to the ContentPlaceHolder controls in Template.master.You need to configure the Web pages so that default content will be shown in the area2 ContentPlaceHolder control whenever a Web Form does not provide that content. What should you do? ()

A. Move default content inside area2 in Template.master. Remove area2 from Web Forms that do not provide content.
B. Move default content inside area2 in Template.master. Leave area2 blank in Web Forms that do not provide content.
C. Move default content inside area2 in the Web Forms. Remove area2 from Template.master.
D. Create an additional ContentPlaceHolder control in Template.master named area2_default. Place default content inside area2_default. Remove area2 from Web Forms that do not provide content.

3.单项选择题You are developing a Web control. The Web control captures user address information in a Web application. You create a class named AddressControl that inherits from CompositeControl. This control consists of child controls. You need to ensure that the child controls are properly output to the browser. Developers using your control must be able to set the appropriate text for labels. In addition, they must be able to pull user address information from the associated text boxes during postback. What should you do? ()

A. Override the EnsureChildControls method of the base class. Add the child controls to the base container.
B. Override the CreateControlCollection method of the base class. Add the child controls to the ControlCollection class.
C. Override the CreateChildControls method of the base class. Add the child controls to the base container.
D. Override the DataBindChildren method of the base class. Add the child controls to the ControlCollection class.

4.单项选择题You are creating a custom control. The UI of the control must contain several text boxes and two buttons. The control must be available in the global assembly cache for reuse across multiple Web applications. You need to achieve this functionality by using the minimum amount of code. What should you do? ()

A. Create a control that derives from System.Web.UI.Control.
B. Create a control that derives from System.Web.UI.WebControls.CompositeControl.
C. Create a control that derives from System.Web.UI.WebControls.WebControl.
D. Create a control that derives from System.Web.UI.UserControl.

5.单项选择题You are creating a templated Web control for use in your Web application. You need to add the Web control to your Web application pages without compiling your control into a .dll file. What should you do? ()

A. Ensure that the Web control inherits from the WebControl class.
B. Ensure that the Web control inherits from the Control class.
C. Ensure that the Web control inherits from the CompositeControl class.
D. Ensure that the Web control inherits from the UserControl class.

6.单项选择题You create a Web server control named ContosoControls. You add a Web custom control named ContosoMailer to it. You then distribute the Web Control Library files to your team. You need to provide your team with the correct procedure for adding the Web Control Library to the items in the toolbox of Microsoft Visual Studio .NET. Which procedure should you provide to the team? ()

A. Within the toolbox, click Choose Items and then browse to and select the ContosoControls user control.
B. Within the toolbox, click Choose Items and then browse to and select the ContosoMailer user control.
C. Right-click Web Project, click Add Reference, and then browse to and select the ContosoControls.dll file.
D. Within the toolbox, click Choose Items and then browse to and select the ContosoControls.dll file.

9.单项选择题Your team creates a Web site. The Web site needs to be deployed to a staging server for performance testing. You plan to make a number of performance enhancements and then retest. You need to compile and copy the Web site to the staging server. What should you do? ()

A. Write a batch file that uses aspnet_compiler.exe.
B. Write a batch file that uses InstallUtil.exe.
C. Write a batch file that uses Csc.exe.
D. Write a batch file that uses aspnet_wp.exe.

最新试题

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

题型:单项选择题

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 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 ble to upload files.Which code segment of the Web.config file should you use?()

题型:单项选择题

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

题型:单项选择题

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 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 site. You add an EditorZone control to the home page on the Web site. You need to enable users to customize the size and location of the Web Parts on their home pages.Which two controls should you add to the EditorZone control?()

题型:多项选择题

You are using the ASP.NET membership APIs to manage user accounts for a Web site. The Web.config file contains the definition for the membership provider. After modifying the Web.config file to enable password recovery, you create a PasswordReset.aspx file.? You need to enable users to reset their passwords online. The new passwords must be sent to them by e-mail after they have logged on through the Login.aspx page. In addition, users must be required to answer their secret questions before resetting their passwords.Which code logic should you use?()

题型:单项选择题

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 ble to upload files.Which code segment of the Web.config file should you use?()

题型:单项选择题