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 chi

题目

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.

相似考题
参考答案和解析
正确答案:C
更多“You are developing a Web control”相关问题
  • 第1题:

    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、DataSource
    • B、DataSourceID
    • C、DataKeyNames
    • D、DataMember

    正确答案:A

  • 第2题:

    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、BehaviorEditorPart
    • B、AppearanceEditorPart
    • C、PropertyGridEditorPart
    • D、LayoutEditorPart

    正确答案:B,D

  • 第3题:

    单选题
    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?()
    A

     Add a FlowDocumentReader control to the design surface. Then create a FlowDocument control.

    B

     Add a DocumentViewer control to the design surface. Then create a FixedDocument control.

    C

     Add a WebBrowser control to the design surface. Then use the Navigate method to navigate the URI object.

    D

     Add a ContentControl control to the design surface. Then reference a WebClient object to return an HTML string.


    正确答案: B
    解析: 暂无解析

  • 第4题:

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


    正确答案: A
    解析: 暂无解析

  • 第5题:

    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、PlaceHolder
    • B、ContentPlaceHolder
    • C、Content
    • D、Substituition

    正确答案:B

  • 第6题:

    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.

    正确答案:B

  • 第7题:

    单选题
    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?()
    A

     Add a FlowDocumentReader control to the design surface. Then create a FlowDocument control.

    B

     Add a ContentControl control to the design surface. The reference a WebClient object to return an HTML string.

    C

     Add a DocumentViewer control to the design surface. The create a FixedDocument control.


    正确答案: B
    解析: 暂无解析

  • 第8题:

    单选题
    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)


    正确答案: B
    解析: 暂无解析