70-515 · Question #4
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. public partial class CustomMaster…
The correct answer is B. Add the following code segment to the Page_Load method of the page code-behind file. See the full explanation below for the reasoning.
Question
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. public partial class CustomMaster : MasterPage { public string Region { get; set; } protected void Page_Load(object sender, EventArgs e) { } } 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 page's Region property in lblRegion. What should you do?
Options
- AAdd the following code segment to the Page_Load method of the page code-behind file.
- BAdd the following code segment to the Page_Load method of the page code-behind file.
- CAdd the following code segment to the Page_Load method of the Custom.Master.cs
- DAdd the following code segment to the Page_Load method of the Custom.Master.cs
How the community answered
(39 responses)- A8% (3)
- B72% (28)
- C15% (6)
- D5% (2)
Community Discussion
No community discussion yet for this question.