nerdexam
Microsoft

70-515 · Question #112

You are implementing an ASP.NET application that includes a page named TestPage.aspx. TestPage.aspx uses a master page named TestMaster.master. You add the following code to the TestPage.aspx…

The correct answer is A. Add the following directive to TestPage.aspx. See the full explanation below for the reasoning.

Question

You are implementing an ASP.NET application that includes a page named TestPage.aspx. TestPage.aspx uses a master page named TestMaster.master. You add the following code to the TestPage.aspx code-behind file to read a TestMaster.master public property named CityName. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim s As String = Master.CityName End Sub You need to ensure that TestPage.aspx can access the CityName property. What should you do?

Options

  • AAdd the following directive to TestPage.aspx.
  • BAdd the following directive to TestPage.aspx.
  • CSet the Strict attribute in the @ Master directive of the TestMaster.master page to true.
  • DSet the Explicit attribute in the @ Master directive of the TestMaster.master page to true.

How the community answered

(28 responses)
  • A
    75% (21)
  • B
    14% (4)
  • C
    7% (2)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice