private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
TxtEditTaskCode.Text = DropDownList1.SelectedValue;
TxtEditTaskDesc.Text = DropDownList1.SelectedItem.Text;
}
1. Why hit database when you already have the data in the drop down.
2. DropDownList1.SelectedItem.Text is the 'Description' DropDownList1.SelectedValue is the 'Code'.
Last edited by hollystyles; Mar 8th, 2007 at 9:36 am.
Reputation Points: 262
Solved Threads: 68
Veteran Poster
Offline 1,181 posts
since Feb 2005