单项选择题

A.Add the following code segment to the Page_Load method of the page code-behind file. CustomMaster custom = this.Parent as CustomMaster; lblRegion.Text = custom.Region;
B.Add the following code segment to the Page_Load method of the page code-behind file. CustomMaster custom = this.Master as CustomMaster; lblRegion.Text = custom.Region;
C.Add the following code segment to the Page_Load method of the Custom.Master.cs code-behind file. Label lblRegion = Page.FindControl("lblRegion") as Label; lblRegion.Text = this.Region;
D.Add the following code segment to the Page_Load method of the Custom.Master.cs code-behind file. Label lblRegion = Master.FindControl("lblRegion") as Label; lblRegion.Text = this.Region;

相关考题

单项选择题 YouareimplementinganASP.NETapplicationthatincludesapagenamedTestPage.aspx.TestPage.aspxusesamasterpagenamedTestMaster.master.YouaddthefollowingcodetotheTestPage.aspxcode-behindfiletoreadaTestMaster.masterpublicpropertynamedCityName.protectedvoidPage_Load(objectsender,EventArgse){strings=Master.CityName;}YouneedtoensurethatTestPage.aspxcanaccesstheCityNameproperty.Whatshouldyoudo?()

单项选择题 YouaredevelopinganASP.NETWebpagethatcontainsinputcontrols,validationcontrols,andabuttonnamedbtnSubmit.Thepagehasthefollowingcode-behind.01PublicClass_Default02InheritsSystem.Web.UI.Page0304ProtectedSubSaveToDatabase()0506EndSub0708ProtectedSubbtnSubmit_Click(ByValsenderAsObject,09ByValeAsEventArgs)HandlesbtnSubmit.Click1011EndSub1213EndClassYouneedtoensurethatalldatathatissubmittedpassesvalidationbeforethedataissavedinadatabase.Whatshouldyoudo?()

单项选择题 YoucreateanewASP.NETMVC2Webapplication.ThefollowingdefaultroutesarecreatedintheGlobal.asax.vbfile.01SharedSubRegisterRoutes(ByValroutesAsRouteCollection)0203routes.IgnoreRoute("{resource}.axd/{*pathInfo}")0405routes.MapRoute("Default","{controller}/{action}/{id}",NewWith{.controller="Home",.action="Index",.id=""})06EndSubYouimplementacontrollernamedHomeControllerthatincludesmethodswiththefollowingsignatures.FunctionIndex()AsActionResultFunctionDetails(ByValidAsInteger)AsActionResultFunctionDetailsByUsername(ByValusernameAsString)AsActionResultYouneedtoaddaroutetomeetthefollowingrequirements.ThedetailsforausermustbedisplayedwhenausernameisenteredasthepathbyinvokingtheDetailsByUsernameaction.Usernamescancontainalphanumericcharactersandunderscores,andcanbebetween3and20characterslong.Whatshouldyoudo?()