I have a Windows Forms project in Visual Studio 2010 and I was wondering how I would set a default selected value of a dropdown menu.
For example, when I run the project currently the dropdown menu is blank until I click on it and select a value. I want to modify the dropdown menu so that it has a value by default that the user can then change. How can I accomplish this both in the designer view and at runtime through C#?
Set property SelectedIndex.
Run-time:
If you want to select option that contains specific text.
Design-time:
Select the control, go to property window and look for SelectedIndex property, set the desired index.