欢迎来到建筑考试题库网 建筑考试题库官网
全部科目 > 微软认证考试 > MCTS > MCTS(70-515)

多项选择题

You create a Web page named TestPage.aspx and a user control named TestUserControl.ascx. TestPage.aspx uses TestUserControl.ascx as shown in the following line of code. On TestUserControl.ascx, you need to add a read-only member named CityName to return the value "New York". You also must add code to TestPage.aspx to read this value. Which two actions should you perform?()

    A.Add the following line of code to the TestUserControl.ascx.cs code-behind file. public string CityName { get { return "New York"; } } 
    B.Add the following line of code to the TestUserControl.ascx.cs code-behind file. protected readonly string CityName = "New York"; 
    C.Add the following code segment to the TestPage.aspx.cs code-behind file. protected void Page_Load(object sender, EventArgs e) { string s = testControl.CityName; } 
    D.Add the following code segment to the TestPage.aspx.cs code-behind file. protected void Page_Load(object sender, EventArgs e) { string s = testControl.Attributes["CityName"]; } 

点击查看答案

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题