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?()
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"]; }&e
查看答案
钢筋闪光对焊后,除对接进行外观检查外,还应按规定进行()。
在电气设备上工作,应填用工作票或按命令执行,其方式有()。
A. 填用第一种工作票
B. 填用第二种工作票
C. 口头命令
D. 电话命令布告命令
电动机受潮后,常采用()法、()法、()等方法,进行干燥。
中国建设银行现金、重要单证核查登记簿(营业网点)按年使用。
A. 正确
B. 错误