Which code segment should you use to declare the control on the Web Form?

Exhibit:

You develop a Web control to manage credit card information. The Web control is shown in the exhibit.
You register the control on the Web Form by using the following code segment.

<%@ Register Assembly="CreditCardUserDetails"
Namespace="CreditCardUserDetails" TagPrefix="cc1" %>

You need to declare the control on the Web Form.
Which code segment should you use?

Exhibit:

You develop a Web control to manage credit card information. The Web control is shown in the exhibit.
You register the control on the Web Form by using the following code segment.

<%@ Register Assembly=”CreditCardUserDetails”
Namespace=”CreditCardUserDetails” TagPrefix=”cc1″ %>

You need to declare the control on the Web Form.
Which code segment should you use?

A.
<cc1:CreditCardDetails ID=”CreditCardDetails1″ runat=”server” Name=”test”>
</cc1:CreditCardDetails><asp:TextBox ID=”TxtName” runat=”server” Text=”<%#CreditCardDetails1.Name%>”>
</asp:TextBox>

B.
<cc1:CreditCardDetails ID=”CreditCardDetails1″ runat=”server” Name=”%#Container.Name%”>
</cc1:CreditCardDetails>

C.
<cc1:CreditCardDetails ID=”CreditCardDetails1″ runat=”server”> <Template> <asp:TextBox ID=”TxtName” runat=”server”
Text=”<%#Container.Name%>”>
</asp:TextBox> </Template>
</cc1:CreditCardDetails>

D.
<cc1:CreditCardDetails ID=”CreditCardDetails1″ runat=”server”> <Template>
<asp:TextBox ID=”TxtName” runat=”server”
Text=”<%#Container.Template%>”></asp:TextBox>
</Template>
</cc1:CreditCardDetails>



Leave a Reply 0

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