单项选择题
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
Your application has a user control named UserCtrl.ascx. You write the following code fragment to create a Web page named Default.aspx.
You need to dynamically add the UserCtrl.ascx control between the lblHeader and lblFooter Label controls.
What should you do? ()
A.
B.
C.
D.
相关考题
-
单项选择题
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 Sub rptData_ItemDataBound(ByVal sender As Object, _ 02 ByVal e As RepeaterItemEventArgs) 03 04 If lbl IsNot Nothing Then 05 If Integer.Parse(lbl.Text) < 10 Then 06 lbl.ForeColor = Color.Red 07 End If 08 End If 09 End Sub You need to retrieve a reference to the lblQuantity Label control into a variable named lbl. Which code segment should you insert at line 03?()
A.
B.
C.
D. -
单项选择题
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; -
单项选择题
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a Web page that contains the following two XML fragments. (Line numbers are included for reference only.) 01 04 05 DataSourceID="SqlDataSource1" 06 07 > 08 09 10 11 Text=<%# Eval("LineTotal") %> /> | English | Chinese | Japan | Korean | - 5 - Test Information Co., Ltd. All rights reserved. 12 13 The SqlDataSource1 object retrieves the data from a Microsoft SQL Server 2005 database table. The database table has a column named LineTotal. You need to ensure that when the size of the LineTotal column value is greater than seven characters, the column is displayed in red color. What should you do?()
A.
B.
C.
D.
