试题详情
- 多项选择题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"]; }
- A,C
关注下方微信公众号,在线模考后查看
热门试题
- Yournetworkconsistso
- You have
- 以下哪项最好地的表述了用户收到的系统和配
- Youhaveastand-alones
- You are m
- Your company h as a
- You are
- You are t
- 你有一台运行Windows
- Your company has dep
- You need
- You have
- 您可以从计算机使用网页服务器的̳
- You are developing
- 概述 高山滑雪公司经营着滑雪胜地,这
- An organizatio
- YouenabletheWindowsS
- Youshareyourcomputer
- You have
- 你需要设计一个方法加密机密数据。你要解决