单项选择题You develop a Web application. Your application contains two settings in the Web.config file. You deploy your application to production. You need to modify the application settings in the production environment without manually editing the XML markup in the Web.config file. What should you do? ()

A. Modify the application settings by using the Web Site Administration Tool.
B. Modify the application settings by using the Visual Studio property page editor for the project.
C. Modify the application settings by using the resource editor.
D. Modify the application settings by using the Visual Studio start options editor.


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题You write a logging function for a Web Form. You call the logging function from the Page_Unload event handler. You test the Web Form and notice that the Page_Unload event handler does not call the logging function. You need to ensure that the logging function is called. What are two possible ways to achieve this goal? ()

A. Set the Page attribute to AutoEventWireup="False". Remove the attribute onunload="Page_Unload" from the Web Form element.
B. Set the Page attribute to AutoEventWireup="False". Add the attribute OnUnload="Page_Unload" to the Web Form element.
C. Set the Page attribute to AutoEventWireup="False". Add the Web Form attribute autocomplete=on.
D. Set the Page attribute to AutoEventWireup="True".

2.单项选择题You write a Web application. This application must support multiple languages. You store the localized strings in the application as resources. You want these resources to be accessed according to a users language preference. You create the following resource files in the App_GlobalResources folder of your application.myStrings.resxmyStrings.enCA.resxmyString.en-US.resxmyStrings.fr-CA.resxmyStrings.es-MX.resx resource file stores a localized version of the following strings: Name, E-mail, Address, and Phone. You create a Web Form that contains one label for each of these strings. You need to ensure that the correct localized version of each string is displayed in each label, according to a users language preference. What should you do? ()

A. Add the following configuration section to the Web.config file. <globalization culture="Auto" />
B. Set the directive for each page in your site as follows: <%@ Page UICulture="Auto" %>
C. Add the following code segment to the pages load event. lblName.Text = "{myStrings}Name" lblAddress.Text = "{myStrings}Address" lblEmail.Text = "{myStrings}Email" lblPhone.Text = "{myStrings}Phone"
D. Add the following code segment to the pages load event. lblName.Text = Resources.myStrings.Name lblAddress.Text =Resources.myStrings.Address lblEmail.Text = Resources.myStrings.Email lblPhone.Text = Resources.myStrings.Phone

3.多项选择题You create a Web Form. The Web Form contains two Web Parts named CustomerPart and OrdersPart. CustomerPart contains a drop-down list of customers. OrdersPart contains a list of orders that a customer has placed. You need to create a static connection between CustomerPart and OrdersPart. When a user selects a customer from CustomerPart, OrdersPart must update. Which four actions should you perform? ()

A. Add the ConnectionProvider attribute to OrdersPart.
B. Add the ConnectionProvider attribute to CustomerPart.
C. Add the ConnectionConsumer attribute to CustomerPart.
D. Add the ConnectionConsumer attribute to OrdersPart.
E. Add OrdersPart and CustomerPart to the WebParts directory.
F. Add OrdersPart and CustomerPart to the App_Code directory.
G. Declare the connections within a StaticConnections subtag of a WebPartZone class.
H. Declare the connections within a StaticConnections subtag of a WebPartManager class.
I. Define an interface specifying the methods and properties that are shared between the Web Parts.

4.单项选择题You have a Web application that is configured for personalization. You need to access personalization data from one of the pages of the Web application by using the minimum amount of administrative effort. What should you do? ()

A. Access the personalization data from the Session property of the HttpContext object.
B. Access the personalization data from the Application property of the HttpContext object.
C. Access the personalization data from the Cache property of the HttpContext object.
D. Access the personalization data from the Profile property of the HttpContext object.

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

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

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

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

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

最新试题

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 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 need to turn on Tracing for a page that is not performing well. You must store the trace information in a database for reporting and trending.Which two actions should you perform?()

题型:多项选择题

You create Web sites for your company. You apply a consistent design to the pages and controls of the Web sites. You need to make style changes to all of the Web sites on the Web server. You want to achieve this goal without having to edit the individual pages on each Web site.Which two actions should you perform?()

题型:多项选择题

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

题型:单项选择题

Certkiller .com's e-Commerce Web application contains a page named Products.aspx that uses data source and data-bound server controls. Customers use the server controls to search for products. The Products.aspx page does not have an associated code-behind file. You need to convert the Products.aspx page to a user control so that its functionality can be reused on other pages.What should you do?()

题型:多项选择题

You create a Web site for a customer. You need to deploy the Web site to the customers server without any of the source files for the Web site. You do not want the customer to be able to update any of the static pages on the Web site.Which tool should you use?()

题型:单项选择题

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

题型:单项选择题

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

题型:多项选择题