nerdexam
Microsoft

70-515 · Question #11

You use the following declaration to add a Web user control named TestUserControl.ascx to an ASP.NET page named TestPage.aspx. <uc:TestUserControl ID="testControl" runat="server"/> You add the…

The correct answer is A. Add the following line of code to TestUserControl.ascx.cs. C. Replace the TestUserControl.ascx reference in TestPage.aspx with the following declaration. See the full explanation below for the reasoning.

Question

You use the following declaration to add a Web user control named TestUserControl.ascx to an ASP.NET page named TestPage.aspx. <uc:TestUserControl ID="testControl" runat="server"/> You add the following code to the code-behind file of TestPage.aspx. private void TestMethod() { ... } You define the following delegate. public delegate void MyEventHandler(); You need to add an event of type MyEventHandler named MyEvent to TestUserControl.ascx and attach the page's TestMethod method to the event. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

Options

  • AAdd the following line of code to TestUserControl.ascx.cs.
  • BAdd the following line of code to TestUserControl.ascx.cs.
  • CReplace the TestUserControl.ascx reference in TestPage.aspx with the following declaration.
  • DReplace the TestUserControl.ascx reference in TestPage.aspx with the following declaration.

How the community answered

(42 responses)
  • A
    76% (32)
  • B
    17% (7)
  • D
    7% (3)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice