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.Partial Public Class Custom Inherits System.Web.UI.MasterPagePublic Property Region As String Protected Sub Page_Load(ByVal sender As Object,ByVal e As System.EventArgs) Handles Me.LoadEnd SubEnd Class 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 pages Region property in lblRegion.What should you do? ()
- A、Add the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Parent lblRegion.Text = custom.Region
- B、Add the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Master lblRegion.Text = custom.Region
- C、Add the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Page.FindControl("lblRegion") lblRegion.Text = Me.Region
- D、Add the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Master.FindControl("lblRegion") lblRegion.Text = Me.Region
正确答案:B
答案解析:有
![](/editor/images/201705/qrcode_for_gh_573e2a458573_258.jpg)
微信扫一扫手机做题