I got solution for it, with help of one my colleague.
Since i had used ListItem to add value and item to ComboBox, cmb_task.SelectedValue didn't work.
It has to be type-casted in the following way to retrieve value.
ListItem list = (ListItem)cmb_task.SelectedItem; taskid = Convert.ToInt32(list.ID);