Multiple choice technology web technology

After capturing the SelectedIndexChanged event for a ListBox control, you find that the event handler doesn’t execute. What could the problem be?

  1. The AutoEventWireup attribute is set to False.

  2. The AutomaticPostBack attribute is set to False.

  3. comThe codebehind module is not properly piled.

  4. The ListBox must be defined WithEvents.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The ListBox's SelectedIndexChanged event only fires automatically when the selection changes if AutoPostBack is set to True. When False (the default), the event only fires during the next postback from another control. Option A refers to automatic event wireup which is unrelated to postback timing. Option C has a typo but codebehind compilation issues would prevent all events.