G
Guest
I'm not feeling too smart right now, but I cannot get the correct drop down
list value from a drop down I have on my web form. I get the initial value
that was loaded in the list. Can someone show me what I am doing wrong and
tell me the correct way? Thank you.
In the page load event, I am doing the following:
//Code I use to populate the dropdown list.
ddAssignedTo.DataValueField = "PersonnelID";
ddAssignedTo.DataTextField = "DisplayName";
ddAssignedTo.DataSource = Personnel.List();
ddAssignedTo.DataBind();
//Code I use to show the value from the database.
ddAssignedTo.SelectedValue = problem.AddedBy.PersonnelId.ToString();
When I change the drop down to another item in the list, and click my update
button, I get the previous value that was selected on page load.
//Code I use for that is:
ddAssignedTo.SelectedValue
What am I doing wrong...thank you.
list value from a drop down I have on my web form. I get the initial value
that was loaded in the list. Can someone show me what I am doing wrong and
tell me the correct way? Thank you.
In the page load event, I am doing the following:
//Code I use to populate the dropdown list.
ddAssignedTo.DataValueField = "PersonnelID";
ddAssignedTo.DataTextField = "DisplayName";
ddAssignedTo.DataSource = Personnel.List();
ddAssignedTo.DataBind();
//Code I use to show the value from the database.
ddAssignedTo.SelectedValue = problem.AddedBy.PersonnelId.ToString();
When I change the drop down to another item in the list, and click my update
button, I get the previous value that was selected on page load.
//Code I use for that is:
ddAssignedTo.SelectedValue
What am I doing wrong...thank you.