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.

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.

相关考题:

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 developing a product search page named Search.aspx for Web application that will be integrated into Certkiller .com's existing e-Commerce Web site. The Search.aspx page allows customers search for products that match specific criteria. Once a product is located, you want an image of the product to be displayed. You want to use an Image control to display the image. You want to configure the Image control to display a description of the image if the image cannot be displayed in the customer's Web browser. What should you do?()A、Set the ToolTip property of the Image control.B、Set the ImageUrl property of the Image control.C、Set the AlternateText property of the Image control.D、Set the DescriptionUrl property of the Image control.

You are developing a Asp.net web application tht includes a panel control that has ID contentsection.You need to add a textBox control to the panel control.()A、this.RequireControlState(this.LoadControl(typeof(TextBox),null));B、this.ContentSection.control.add(this.FindControl(ContentSection.ID + "asp:TextBox"));C、this.ContentSection.control.add(this.LoadControl(typeof(TextBox),null));D、this.LoadComplete("asp:TextBox").IntiantiateIn(Content Section)

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 are developing an ASP.NET Web page. The page includes a List instance. You add a FormView control to display a single Product from this list. You need to bind the list to the FormView control. Which FormView property should you set in the code-behind file?()A、DataSourceB、DataSourceIDC、DataKeyNamesD、DataMember

You are developing an ASP.NET Web application. You create a master page. The master page requires a region where you can add page-specific content by using theASP.NET page designer. You need to add a control to the master page to define the region. Which control should you add?()A、PlaceHolderB、ContentPlaceHolderC、ContentD、Substituition

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?()A、BehaviorEditorPartB、AppearanceEditorPartC、PropertyGridEditorPartD、LayoutEditorPart

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 developing a Windows Presentation Foundation (WPF) application.You need to display HTML content from a Web page on the WPF form. What should you do?()AAdd a FlowDocumentReader control to the design surface. Then create a FlowDocument control.BAdd a DocumentViewer control to the design surface. Then create a FixedDocument control.CAdd a WebBrowser control to the design surface. Then use the Navigate method to navigate the URI object.DAdd a ContentControl control to the design surface. Then reference a WebClient object to return an HTML string.

单选题You are developing a Windows Presentation Foundation (WPF) application. You need to display HTML content from a Web Page on the WPF form. What should you do?()AAdd a FlowDocumentReader control to the design surface. Then create a FlowDocument control.BAdd a ContentControl control to the design surface. The reference a WebClient object to return an HTML string.CAdd a DocumentViewer control to the design surface. The create a FixedDocument control.

单选题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?()AAdd a Web Control Library project to your solution. Define a class that inherits from CompositeControl.BAdd a Windows Control Library project to your solution. Define a class that inherits from UserControl.CAdd a Web User Control to your project. Define a class that inherits from UserControl.DAdd a Mobile Web User Control to your project. Define a class that inherits from MobileUserControl.

单选题You are developing a Asp.net web application tht includes a panel control that has ID contentsection.You need to add a textBox control to the panel control.()Athis.RequireControlState(this.LoadControl(typeof(TextBox),null));Bthis.ContentSection.control.add(this.FindControl(ContentSection.ID + asp:TextBox));Cthis.ContentSection.control.add(this.LoadControl(typeof(TextBox),null));Dthis.LoadComplete(asp:TextBox).IntiantiateIn(Content Section)