YoucreateaWebpagenamedTestPage.aspxandausercontrolnamedTestUserControl.ascx.TestPage.aspxusesTestUserControl.ascxasshowninthefollowinglineofcode.OnTestUserControl.ascx,youneedtoaddaread-onlymembernamedCityNametoreturnthevalue"NewYork".YoualsomustaddcodetoTestPage.aspxtoreadthisvalue.Whichtwoactionsshouldyouperform?()A.AddthefollowinglineofcodetotheTestUserControl.ascx.cscode-behindfile.publicstringCityName{get{returnNewYork;}}B.AddthefollowinglineofcodetotheTestUserControl.ascx.cscode-behindfile.protectedreadonlystringCityName=NewYork;C.AddthefollowingcodesegmenttotheTestPage.aspx.cscode-behindfile.protectedvoidPage_Load(objectsender,EventArgse){strings=testControl.CityName;}D.AddthefollowingcodesegmenttotheTestPage.aspx.cscode-behindfile.protectedvoidPage_Load(objectsender,EventArgse){strings=testControl.Attributes[CityName];}
YoucreateaWebpagenamedTestPage.aspxandausercontrolnamedTestUserControl.ascx.TestPage.aspxusesTestUserControl.ascxasshowninthefollowinglineofcode.OnTestUserControl.ascx,youneedtoaddaread-onlymembernamedCityNametoreturnthevalue"NewYork".YoualsomustaddcodetoTestPage.aspxtoreadthisvalue.Whichtwoactionsshouldyouperform?()
A.AddthefollowinglineofcodetotheTestUserControl.ascx.cscode-behindfile.publicstringCityName{get{return"NewYork";}}
B.AddthefollowinglineofcodetotheTestUserControl.ascx.cscode-behindfile.protectedreadonlystringCityName="NewYork";
C.AddthefollowingcodesegmenttotheTestPage.aspx.cscode-behindfile.protectedvoidPage_Load(objectsender,EventArgse){strings=testControl.CityName;}
D.AddthefollowingcodesegmenttotheTestPage.aspx.cscode-behindfile.protectedvoidPage_Load(objectsender,EventArgse){strings=testControl.Attributes["CityName"];}