niusouti.com

YouarecreatinganASP.NETWebsite.ThesitehasamasterpagenamedCustom.master.Thecode-behindfileforCustom.mastercontainsthefollowingcodesegment.YoucreateanewASP.NETpageandspecifyCustom.masterasitsmasterpage.YouaddaLabelcontrolnamedlblRegiontothenewpage.Youneedto

题目

YouarecreatinganASP.NETWebsite.ThesitehasamasterpagenamedCustom.master.Thecode-behindfileforCustom.mastercontainsthefollowingcodesegment.YoucreateanewASP.NETpageandspecifyCustom.masterasitsmasterpage.YouaddaLabelcontrolnamedlblRegiontothenewpage.Youneedtodisplaythevalueofthemasterpage’sRegionpropertyinlblRegion.Whatshouldyoudo?()

A.AddthefollowingcodesegmenttothePage_Loadmethodofthepagecode-behindfile. CustomMastercustom=this.ParentasCustomMaster;lblRegion.Text=custom.Region;

B.AddthefollowingcodesegmenttothePage_Loadmethodofthepagecode-behindfile.CustomMastercustom=this.MasterasCustomMaster;lblRegion.Text=custom.Region;

C.AddthefollowingcodesegmenttothePage_LoadmethodoftheCustom.Master.cscode-behindfile.LabellblRegion=Page.FindControl("lblRegion")asLabel;lblRegion.Text=this.Region;

D.AddthefollowingcodesegmenttothePage_LoadmethodoftheCustom.Master.cscode-behindfile.LabellblRegion=Master.FindControl("lblRegion")asLabel;lblRegion.Text=this.Region;


相似考题
参考答案和解析
参考答案:B