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 usin

题目

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
更多“You are creating a custom control. The UI of the control must contain several text boxes a ”相关问题
  • 第1题:

    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.

    正确答案:A,D

  • 第2题:

    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

  • 第3题:

    单选题
    You are creating a Windows Forms Application by using the .NET Framework 3.5.You plan to design a new control that will be used on multiple forms in the app.You need to ensure that the control meets the following requirement:   (1)It retrieves data from a MSSQL Server 2008 database instance.   (2)It uses WPF classes to display data.   (3)It uses user-customizable actions when the control is first painted on the form.    What should you do?()
    A

    Create a new custom class for the control that is derived from the Control class.

    B

    Create a new custom class for the control that is derived from the UserControl class.

    C

    Create a new custom class for the control that is derived from the ContentControl class.

    D

    Create a new custom class for the control that is derived from the ContentPresenter class.


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

  • 第4题:

    单选题
    You use Microsoft .NET Framework 4 to create a Windows Presentation Framework (WPF) application. You plan to create a custom control that contains four text input fields. Each of the text input fields within the control will contain a label. You need to ensure that the text input fields within the control can be validated by using a regular expression validator. Which class should you inherit from?()
    A

     TextBox

    B

     TextElement

    C

     UIElement

    D

     UserControl


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

  • 第5题:

    单选题
    You are creating a Windows Forms application by using the .NET Framework 3.5.You plan to develop a new control for the application. You need to ensure that the control extends the DataGridView control by allowing the cells to contain multicolored text. What should you do?()
    A

    Override the OnPaint method.

    B

    Write a code segment to handle the CellPainting event.

    C

    Write a code segment to handle the CellParsing event.

    D

    Write a code segment to handle the RowPostPaint event.


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

  • 第6题:

    You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You create a custom-templated server control.  You need to ensure that the child controls of the server control are uniquely identified within the control hierarchy of the page.  Which interface should you implement?()

    • A、the ITemplatable interface
    • B、the INamingContainer interface
    • C、the IRequiresSessionState interface
    • D、the IPostBackDataHandler interface

    正确答案:B

  • 第7题:

    单选题
    You are creating an ASP.NET Web site. The site has a master page named Custom.master. The code-behind file for Custom.master contains the following code segment.Partial Public Class Custom  Inherits System.Web.UI.MasterPagePublic Property Region As String    Protected Sub Page_Load(ByVal sender As Object,ByVal e As System.EventArgs) Handles Me.LoadEnd SubEnd Class You create a new ASP.NET page and specify Custom.master as its master page.You add a Label control named lblRegion to the new page.  You need to display the value of the master pages Region property in lblRegion.What should you do? ()
    A

    Add the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Parent  lblRegion.Text = custom.Region

    B

    Add the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Master  lblRegion.Text = custom.Region

    C

    Add the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Page.FindControl(lblRegion) lblRegion.Text = Me.Region

    D

    Add the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Master.FindControl(lblRegion) lblRegion.Text = Me.Region


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

  • 第8题:

    单选题
    Which of the following is NOT one of the three details you need to fill in on the New Custom Control dialog?()
    A

    Name of the custom control

    B

    Comments to describe the custom control

    C

    List of the controls that will make up this custom control

    D

    Application that will contain the custom control


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

  • 第9题:

    单选题
    You are creating a Windows Forms Application by using the .NET Framework 3.5.You plan to design a control for the application.You need to ensure that the control meets the following requirements:    (1)Contains the DataGridView, BindingSource, and BindingNavigator controls.  (2)Exposes the properties of the BindingSource control.   (3)Protects the properties of the DataGridView and BindingNavigator controls.    What sholud you do?()
    A

    Extend the Control class.

    B

    Extend the ContainerControl class.

    C

    Create protected accesses for each control property.

    D

    Create public accesses for the properties of the BindingSource control.


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

  • 第10题:

    单选题
    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
    解析: 暂无解析