网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

You create a Web Form with several UI elements on it. During a code review, you realize that some of the UI elements can be grouped into user controls. You need to create a Web control to group the UI elements that do not require server-side processing. Doing so will enable you to programmatically add or remove the UI elements from the page. You want to maintain the UI elements' style properties. What should you do? ()

  • A、Use System.Web.UI.TemplateControl to group the UI elements.
  • B、Use System.Web.UI.HtmlControls.HtmlControl to group the UI elements.
  • C、Use System.Web.UI.LiteralControl to group the UI elements.
  • D、Use System.Web.UI.WebControls.Literal to group the UI elements.

参考答案

更多 “ You create a Web Form with several UI elements on it. During a code review, you realize that some of the UI elements can be grouped into user controls. You need to create a Web control to group the UI elements that do not require server-side processing. Doing so will enable you to programmatically add or remove the UI elements from the page. You want to maintain the UI elements' style properties. What should you do? ()A、Use System.Web.UI.TemplateControl to group the UI elements.B、Use System.Web.UI.HtmlControls.HtmlControl to group the UI elements.C、Use System.Web.UI.LiteralControl to group the UI elements.D、Use System.Web.UI.WebControls.Literal to group the UI elements.” 相关考题
考题 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.

考题 You are implementing an ASP.NET application that uses data-bound GridView controls in multiple pages. You add JavaScript code to periodically update specific types of data items in these GridView controls. You need to ensure that the JavaScript code can locate the HTML elements created for each row in these GridView controls, without needing to be changed if the controls are moved from one page to another. What should you do?()A、Replace the GridView control with a ListView control.B、Set the ClientIDMode attribute to Predictable in the web.config file.C、Set the ClientIDRowSuffix attribute of each unique GridView control to a different value.D、Set the @ OutputCache directives VaryByControl attribute to the ID of the GridView control.

考题 You create a Web Form. The Web Form uses the FormView control to enable a user to edit a record in the database. When the user clicks the Update button on the FormView control, the application must validate that the user has entered data in all of the fields. You need to ensure that the Web Form does not update if the user has not entered data in all of the fields. Which code segment should you use? ()A、Protected Sub FormView1_ItemUpdating(ByVal sender As Object, _ ByVal e As System.Web.UI.WebControls.FormViewUpdateEventArgs) _ Handles FormView1.ItemUpdating Dim entry As DictionaryEntry For Each entry In e.Keys If entry.Value.ToString() = System.String.Empty Then e.Cancel = True Return End If Next entryEnd SubB、Protected Sub FormView1_ItemUpdated(ByVal sender As Object, _ ByVal e As System.Web.UI.WebControls.FormViewUpdatedEventArgs) _ Handles FormView1.ItemUpdated Dim entry As DictionaryEntry For Each entry In e.NewValues If entry.Value.Equals("") Then e.KeepInEditMode = True Return End If Next entryEnd SubC、Protected Sub FormView1_ItemUpdating(ByVal sender As Object, _ ByVal e As System.Web.UI.WebControls.FormViewUpdateEventArgs) _ Handles FormView1.ItemUpdating Dim entry As DictionaryEntry For Each entry In e.NewValues If entry.Value.Equals("") Then e.Cancel = True Return End If Next entryEnd SubD、Protected Sub FormView1_ItemUpdated(ByVal sender As Object, _ ByVal e As System.Web.UI.WebControls.FormViewUpdatedEventArgs) _ Handles FormView1.ItemUpdated Dim entry As DictionaryEntry For Each entry In e.Keys If entry.Value.ToString() = System.String.Empty Then e.KeepInEditMode = True Return End If Next entryEnd Sub

考题 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application that allows users to arrange images. You need to ensure that users can arrange child elements in a panel without affecting the size of the elements. You also need to ensure that child elements are oriented horizontally. Which control should you use?()A、ListBoxB、DockPanelC、WrapPanelD、StackPanel

考题 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.

考题 You create a mobile Web application. You need to use a Command control to post user input from the UI elements back to the server. What are two possible ways to achieve this goal?()A、Place the Command control within an instance of the System.Web.UI.MobileControls.SelectionList control.B、Place the Command control within an instance of the System.Web.UI.MobileControls.ObjectList control.C、Place the Command control within an instance of the System.Web.UI.MobileControls.Form control.D、Place the Command control within an instance of the System.Web.UI.MobileControls.Panel control.

考题 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.

考题 You need to design the storage of the application texts for UI elements to fulfill the requirements. Which table and column design should you use?()A、Languages (LanguageID, Name)Elements (ElementID, Description)ElementLanguages (ElementID, LanguageID, Text) B、Languages (LanguageID, Name)Elements (ElementID, LanguageID, Description, Text) C、Languages (LanguageID, Name)ElementTexts (LanguageID, Text)ElementDescriptions (ElementID, Description) D、Languages (LanguageID, Name)Elements (ElementID, Description, Text)

考题 You want to enable users of a Web application to modify the Web application's UI and behavior. These modifications must be maintained at the user level so that when users return to the Web application, the changes are still in effect. You need to achieve this goal by using the minimum amount of custom code. What should you do?()A、Persist control data by using view state.B、Use Web Part controls.C、Maintain a profile for each user.D、Enable session state on the Web application.

考题 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.

考题 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.

考题 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application includes a function that is triggered by filling out a form and by clicking a button. Currently, the application is tested manually. You need to create an automated and iterative process to test the application. What should you do?()A、Use IntelliTrace.B、Use UISpy.exe to extract the user interface (UI) information. Then, use MSTest.exe.C、Use classes in the System.Windows.Automation and System.Windows.Automation.Text namespaces.D、Use the Action Recording methodology to record the user interface (UI) actions.Then, use MSTest.exe.

考题 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You discover that when the application runs, a user control is not rendered correctly. You need to find out the user interface (UI) element of the window that is causing the rendering problem. What should you do?()A、Use the Local Window.B、Use the WPF Visualizer.C、Generate a trace log by using IntelliTrace.D、Set a breakpoint at the control. Run the application.

考题 单选题You need to design the storage of the application texts for UI elements to fulfill the requirements. Which table and column design should you use?()A Languages (LanguageID, Name)Elements (ElementID, Description)ElementLanguages (ElementID, LanguageID, Text) B Languages (LanguageID, Name)Elements (ElementID, LanguageID, Description, Text) C Languages (LanguageID, Name)ElementTexts (LanguageID, Text)ElementDescriptions (ElementID, Description) D Languages (LanguageID, Name)Elements (ElementID, Description, Text)

考题 多选题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?()AApply the TemplateContainerAttribute to a property of type ITemplate. Pass the type of the template's naming container as the argument to the attribute.BApply the TemplateContainerAttribute to the user control's class declaration.CImplement a property of type INamingContainer in the user control's code-behind class.DImplement a property of type ITemplate in the user control's code-behind class.EDefine a new class that inherits from the ITemplate interface. Implement the InstantiateIn method of the ITemplate interface.

考题 单选题You create a Web Form with several UI elements on it. During a code review, you realize that some of the UI elements can be grouped into user controls. You need to create a Web control to group the UI elements that do not require server-side processing. Doing so will enable you to programmatically add or remove the UI elements from the page. You want to maintain the UI elements' style properties. What should you do? ()A Use System.Web.UI.TemplateControl to group the UI elements.B Use System.Web.UI.HtmlControls.HtmlControl to group the UI elements.C Use System.Web.UI.LiteralControl to group the UI elements.D Use System.Web.UI.WebControls.Literal to group the UI elements.

考题 单选题You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application includes a function that is triggered by filling out a form and by clicking a button. Currently, the application is tested manually. You need to create an automated and iterative process to test the application. What should you do?()A Use IntelliTrace.B Use UISpy.exe to extract the user interface (UI) information. Then, use MSTest.exe.C Use classes in the System.Windows.Automation and System.Windows.Automation.Text namespaces.D Use the Action Recording methodology to record the user interface (UI) actions.Then, use MSTest.exe.

考题 单选题You are implementing an ASP.NET application that uses data-bound GridView controls in multiple pages. You add JavaScript code to periodically update specific types of data items in these GridView controls. You need to ensure that the JavaScript code can locate the HTML elements created for each row in these GridView controls, without needing to be changed if the controls are moved from one page to another. What should you do?()A Replace the GridView control with a ListView control.B Set the ClientIDMode attribute to Predictable in the web.config file.C Set the ClientIDRowSuffix attribute of each unique GridView control to a different value.D Set the @ OutputCache directives VaryByControl attribute to the ID of the GridView control.

考题 多选题You create a mobile Web application. You need to use a Command control to post user input from the UI elements back to the server. What are two possible ways to achieve this goal?()APlace the Command control within an instance of the System.Web.UI.MobileControls.SelectionList control.BPlace the Command control within an instance of the System.Web.UI.MobileControls.ObjectList control.CPlace the Command control within an instance of the System.Web.UI.MobileControls.Form control.DPlace the Command control within an instance of the System.Web.UI.MobileControls.Panel control.

考题 单选题You want to enable users of a Web application to modify the Web application's UI and behavior. These modifications must be maintained at the user level so that when users return to the Web application, the changes are still in effect. You need to achieve this goal by using the minimum amount of custom code. What should you do?()A Persist control data by using view state.B Use Web Part controls.C Maintain a profile for each user.D Enable session state on the Web application.

考题 多选题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?()AAdd the OnClick event handler for the Login button to the code used in the custom user control.BAdd the OnClick event handler for the Login button to the code used in the Web Form where the control is added.CIn 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.DIn the Page_Load method of the custom user control, add a code segment to set the visibility of the TextBox and Button controls.

考题 多选题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? ()AAdd the OnClick event handler for the Login button to the code used in the custom user control.BAdd the OnClick event handler for the Login button to the code used in the Web Form where the control is added.CIn 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.DIn the Page_Load method of the custom user control, add a code segment to set the visibility of the TextBox and Button controls.

考题 单选题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 = TrueB Wizard1.Email = user@address.comC Wizard1.MailDefinition.From = registration@mysite.comD SmtpMail.SmtpServer = mail.contoso.com

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