Which code segment should you insert at line 06?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a Web form by using ASP.NET AJAX.
The Web form contains the following code fragment. (Line numbers are included for reference only.)

01 <script type="text/javascript">
02
03 Sys.Application.add_init(initComponents);
04
05 function initComponents() {
06
07 }
08
09 </script>
10
11 <asp:ScriptManager ID="ScriptManager1"
12 runat="server" />
13 <asp:TextBox runat="server" ID="TextBox1" />

You need to create and initialize a client behavior named MyCustomBehavior by using the initComponents function. You also need to ensure that MyCustomBehavior is attached to the TextBox1 Textbox control.
Which code segment should you insert at line 06?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a Web form by using ASP.NET AJAX.
The Web form contains the following code fragment. (Line numbers are included for reference only.)

01 <script type="text/javascript">
02
03 Sys.Application.add_init(initComponents);
04
05 function initComponents() {
06
07 }
08
09 </script>
10
11 <asp:ScriptManager ID="ScriptManager1"
12 runat="server" />
13 <asp:TextBox runat="server" ID="TextBox1" />

You need to create and initialize a client behavior named MyCustomBehavior by using the initComponents function. You also need to ensure that MyCustomBehavior is attached to the TextBox1 Textbox control.
Which code segment should you insert at line 06?

A.
$create(MyCustomBehavior, null, null, null, ‘TextBox1’);

B.
$create(MyCustomBehavior, null, null, null, $get(‘TextBox1’));

C.
Sys.Component.create(MyCustomBehavior, ‘TextBox1’, null, null, null);

D.
Sys.Component.create(MyCustomBehavior, $get(‘TextBox1’), null, null, null);



Leave a Reply 0

Your email address will not be published. Required fields are marked *