Setting DropDownList default question

  • Thread starter Thread starter Mike P
  • Start date Start date
Is it possible to set the last item in a DropDownList as the default,
and if so how?

There is no such thing as a "default" item in a drop down list. If you
simply want to make the last item in the list the SELECTED item, then do

myListBox.SelectedIndex = myListBox.Items.Count - 1;

This assumes you are using a non-data-bound list. I can't help you with data
binding as I virtually never use it.
 
Back
Top