I have a drop down list that pulls data from a database to show some of its options:
try this
String taskID = DropDownList3.SelectedItem.Value;