nerdexam
Microsoft

70-515 · Question #161

You are dynamically adding controls to an ASP.NET page in the Page_Load event handler. The page will have text boxes that correspond to the columns in a database table. Each text box will be…

The correct answer is D. For each column, create an asp:Label control and set the AssociatedControlID to the ID of. See the full explanation below for the reasoning.

Question

You are dynamically adding controls to an ASP.NET page in the Page_Load event handler. The page will have text boxes that correspond to the columns in a database table. Each text box will be preceded by a label that displays the name of the corresponding column. You need to create the form so that when the user clicks the label, the corresponding text box is selected for input. What should you do?

Options

  • AFor each column, output the following HTML, where COL is replaced by the name of the
  • BFor each column, output the following HTML, where COL is replaced by the name of the
  • CFor each column, create an asp:Label control and a corresponding asp:TextBox that have
  • DFor each column, create an asp:Label control and set the AssociatedControlID to the ID of

How the community answered

(33 responses)
  • A
    6% (2)
  • B
    9% (3)
  • C
    3% (1)
  • D
    82% (27)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice