当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

YoucreateaWebpagenamedTestPage.aspxandausercontrolnamedTestUserControl.ascx.TestPage.aspxu


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"];}

参考答案
您可能感兴趣的试题
    暂无相关推荐