试题详情
- 单项选择题 You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a Web form and add the following code fragment. The SqlDataSource1 DataSource control retrieves the Quantity column values from a table named Products. You write the following code segment to create the rptData_ItemDataBound event handler. (Line numbers are included for reference only.) 01 protected void rptData_ItemDataBound(object sender, 02 RepeaterItemEventArgs e) 03 { 04 05 if(lbl != null) 06 if(int.Parse(lbl.Text) < 10) 07 lbl.ForeColor = Color.Red; 08 } You need to retrieve a reference to the lblQuantity Label control into a variable named lbl. Which code segment should you insert at line 04?()
A、Label lbl = Page.FindControl("lblQuantity") as Label;
B、Label lbl = e.Item.FindControl("lblQuantity") as Label;
C、Label lbl = rptData.FindControl("lblQuantity") as Label;
D、Label lbl = e.Item.Parent.FindControl("lblQuantity") as Label;
- B
关注下方微信公众号,在线模考后查看
热门试题
- You have
- You have
- You create&ensp
- 您正在开发一个协助用户进行电子调查的应用
- You have
- You are
- 公司有一个Active Di
- 你是公司网络管理员。网络中包含一个单活动
- Rate your level of
- 你是TestKing网站的技术员,公司网
- 技术支持工程师报告说“在SQL̳
- Explanation/Referen
- You are u
- Your company&rs
- Yournetworkconsistso
- Your company&e
- 你需要设计一个方法能够让IT部门和HR部
- You have
- Which control&
- 一位用户报告无法启动计算机。他提供了以下