1. Question: You want to create a user control that will encapsulate basic data entry functionality and that will be reused across a site. What steps should you take? (Choose all that apply.)

    A
    Create an ASPX file and use the @ Register directive at the top of the page to indicate that the markup in the file is a user control.

    B
    Create a code-behind file for your user control that contains a class that inherits from System.Web.UI.UserControl.

    C
    Create a code-behind file for your user control that contains a class that inherits from System.Web.UI.Page.

    D
    Create an ASCX file and use the @ Control directive at the top of the page to indicate that the markup in the file is a user control.

    Note: Not available
    1. Report
  2. Question: You want to consume a user control on a page. However, you do not know the number of instances you want to create. This information will be available at run time. Therefore, you want to dynamically create these controls. Which actions should you take? (Chooseall that apply.)

    A
    Add the controls by using the Controls.Add method of the page instance.

    B
    Add the controls by using the Controls.Add method of the form instance.

    C
    Call the form’s LoadControl method for each control you want to add to the page.

    D
    Call the page’s LoadControl method for each control you want to add to the page.

    Note: Not available
    1. Report
  3. Question: You want to create a user control to display data, but you are concerned that you don’t know how the webpage designers want to format the data. Also, some of the page designers mention that the format of the data might be different, depending on the webpage. How can you best create a user control to solve this problem?

    A
    Create a separate user control for each webpage and get each webpage designer to tell you the format to implement in each user control.

    B
    Create a separate user control for each variation of the format after the webpage designers give you the desired formatting options.

    C
    Create a templated user control that exposes the data to the webpage designers so they can specify their desired format.

    D
    Create a user control that simply renders the data and let the webpage designers specify the style properties for the user control.

    Note: Not available
    1. Report
  4. Question: You have two TextBox controls inside your user control. You want to allow a developer using the user control to initialize, read, and modify the Text property of these controls. What step should you take?

    A
    Add a constructor to the user control. The constructor should take parameters for each of the TextBox.Text properties. It will then set these parameter values appropriately.

    B
    Create properties on the user control that allow users to get and set the Text property of each TextBox control.

    C
    You don't need to do anything. Controls added to a user control, by default, expose their default property.

    D
    Add code to the Init method of the user control. This code should raise an event. The page that hosts the control can then use this event to set the TextBox.Text properties accordingly.

    Note: Not available
    1. Report
  5. Question: You are creating a custom web server control that extends the features of the ASP.NET Button control. Which steps should you take? (Choose all that apply.)

    A
    Ensure that your control inherits from the WebControl class and exposes the base Button control as a property of the class.

    B
    Ensure that your control inherits directly from the Button control.

    C
    Override the Render method of your control and be sure to call base.Render (C#) or MyBase.Render (Visual Basic).

    D
    Override the RenderChildren method of your control and be sure to call base.RenderChildren (C#) or MyBase.RenderChildren (Visual Basic).

    Note: Not available
    1. Report
  6. Question: You want to define a custom image to be displayed in the Toolbox for your custom web server control. Which actions do you take? (Choose all that apply.)

    A
    Set a reference to the System.Design namespace.

    B
    Set a reference to the System.Drawing namespace.

    C
    Add the ToolboxData attribute to the class.

    D
    Add the ToolboxBitmap attribute to the class.

    Note: Not available
    1. Report
  7. Question: You are going to create a custom web server control that inherits directly from the WebControl class. Which method do you need to override to get your control to display in the browser window?

    A
    OnInit

    B
    Finalize

    C
    ToString

    D
    Render

    Note: Not available
    1. Report
  8. Question: You are creating a composite control. You create a class that inherits from the CompositeControl class. What method must be overridden so you can provide code to instantiate the child controls and set their properties?

    A
    CreateChildControls

    B
    DataBindChildren

    C
    CreateControlStyle

    D
    BuildProfileTree

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd