Well, what you are doing looks right - depending on when it's happening during the page lifecycle -
ASP.NET Page Life Cycle[
^].
You also have to make sure that there are items in the dropdownlist1 before setting SelectedIndex - if the control is bound, this has to happen after binding has completed and not on postbacks.
Best regards
Espen Harlinn