nerdexam
Microsoft

70-515 · Question #9

You create a Web page named TestPage.aspx and a user control named contained in a file named TestUserControl.ascx. You need to dynamically add TestUserControl.ascx to TestPage.aspx. Which code…

The correct answer is C. protected void Page_PreInit(object sender, EventArgs e). See the full explanation below for the reasoning.

Question

You create a Web page named TestPage.aspx and a user control named contained in a file named TestUserControl.ascx. You need to dynamically add TestUserControl.ascx to TestPage.aspx. Which code segment should you use?

Options

  • Aprotected void Page_Load(object sender, EventArgs e)
  • Bprotected void Page_Load(object sender, EventArgs e)
  • Cprotected void Page_PreInit(object sender, EventArgs e)
  • Dprotected void Page_PreInit(object sender, EventArgs e)

How the community answered

(57 responses)
  • A
    5% (3)
  • B
    2% (1)
  • C
    82% (47)
  • D
    11% (6)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice