Your code is correct just write it into index change or set AutopostBack property of dropdownlist to True.
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (DropDownList1.SelectedIndex >= 0)
lbl.Text = DropDownList1.SelectedIndex.ToString();
}