nerdexam
Microsoft

70-515 · Question #13

You are implementing an ASP.NET page that includes the following drop-down list. <asp:PlaceHolder ID="dynamicControls" runat="server"> <asp:DropDownList ID="MyDropDown" runat="server"> <asp:ListItem…

The correct answer is B. Add the following OnPreRender event handler to the asp:DropDownList. See the full explanation below for the reasoning.

Question

You are implementing an ASP.NET page that includes the following drop-down list. <asp:PlaceHolder ID="dynamicControls" runat="server"> <asp:DropDownList ID="MyDropDown" runat="server"> <asp:ListItem Text="abc" value="abc" /> <asp:ListItem Text="def" value="def" /> </asp:DropDownList> </asp:PlaceHolder> You need to dynamically add values to the end of the drop-down list. What should you do?

Options

  • AAdd the following OnPreRender event handler to the asp:DropDownList
  • BAdd the following OnPreRender event handler to the asp:DropDownList
  • CAdd the following event handler to the page code-behind.
  • DAdd the following event handler to the page code-behind.

How the community answered

(37 responses)
  • A
    14% (5)
  • B
    76% (28)
  • C
    8% (3)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice