set current month in a combo box

sde

Centurion
Joined
Aug 28, 2003
Messages
160
Location
us.ca.fullerton
i need to make this combobox have the current month selected .. can someone help?

i'm working with something like this:

Code:
cbMonth.Items.Add(1);
cbMonth.Items.Add(2);
cbMonth.Items.Add(3);
cbMonth.Items.Add(4);
cbMonth.Items.Add(5);
cbMonth.Items.Add(6);
cbMonth.Items.Add(7);
cbMonth.Items.Add(8);
cbMonth.Items.Add(9);
cbMonth.Items.Add(10);
cbMonth.Items.Add(11);
cbMonth.Items.Add(12);

cbMonth.SelectedValue = DateTime.Now.Month;
and this doesn't work.
 
Back
Top