单项选择题
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create the following controls:
¡¤A composite custom control named MyControl.
¡¤A templated custom control named OrderFormData.
You write the following code segment to override the method named CreateChildControls() in the MyControl class. (Line numbers are included for reference only.)
01 Protected Overloads Overrides Sub CreateChildControls()
02 Controls.Clear()
03 Dim oFData As New OrderFormData("OrderForm")
04
05 End Sub
You need to add the OrderFormData control to the MyControl control.
Which code segment should you insert at line 04? ()
A.Controls.Add(oFData)
B.
C.
D.
相关考题
-
单项选择题
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create the following controls: ¡¤A composite custom control named MyControl. ¡¤A templated custom control named OrderFormData. You write the following code segment to override the method named CreateChildControls() in the MyControl class. (Line numbers are included for reference only.) 01 protected override void 02 CreateChildControls() { 03 Controls.Clear(); 04 OrderFormData oFData = new 05 ?OrderFormData("OrderForm"); 06 07 } You need to add the OrderFormData control to the MyControl control. Which code segment should you insert at line 06?()
A.Controls.Add(oFData);
B.
C.
D. -
单项选择题
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create two user controls named UserCtrlA.ascx and UserCtrlB.ascx. The user controls postback to the server. You create a new Web page that has the following ASPX code. To dynamically create the user controls, you write the following code segment for the Web page. You need to ensure that the user control that is displayed meets the following requirements: ¡¤It is recreated during postback ¡¤It retains its state. Which method should you add to the Web page?()
A.
B.
C.
D. -
单项选择题
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create two user controls named UserCtrlA.ascx and UserCtrlB.ascx. The user controls postback to the server. You create a new Web page that has the following ASPX code. You need to ensure that the user control that is displayed meets the following requirements: ¡¤It is recreated during postback ¡¤It retains its state. Which method should you add to the Web page?()
A.
B.
C.
D.
