I have a drop down box that causes the following error when I bind it to a datasource that returns no records.
'ddJob' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
What's the work-around here?
Here's my code - it bombs on the last line:
// Fill DropDownList with Jobs and add All as a selection option
SHATutil shat = new SHATutil();
ddJob.DataSource = shat.GetUserJobs(Profile.UserName);
ddJob.DataTextField = "JobName";
ddJob.DataValueField = "JobName";
ddJob.DataBind();