Dropdown output
<p>I am using the following code to populate a second dropdown based on a selection made from the first dropdown. First, a project is chosen from the first dropdown, then the second one populates with iterations if a member was assigned to that project. At the moment, the second combobox displays a blank value if the member is not assigned to a project. What I would like to do is populate it with a message if that is the case - something like: -- You are not a member on this project --. Thanks!</p>

<pre><code> protected void fillIterations()
 {
    selected_project = selectproject.SelectedValue;

    SqlConnection conn = new SqlConnection(GetConnectionString());
    conn.Open();

    cmd3 = new SqlCommand("SELECT DISTINCT(CONVERT(VARCHAR(10), i.StartDate, 103) + ' - ' + CONVERT(VARCHAR(10), i.EndDate, 103)) AS Iteration, i.ProjectIterationID FROM Iterations i, ProjectIterationMember pim WHERE i.ProjectIterationID = pim.ProjectIterationID AND i.ProjectID = '" + selected_project + "' AND pim.MemberID = '" + mem_id + "'", conn);

    cmd3.CommandType = CommandType.Text;

    SqlDataAdapter da3 = new SqlDataAdapter(cmd3);

    DataSet ds3 = new DataSet();

    da3.Fill(ds3);

    conn.Close();

    selectiteration.DataSource = ds3;
    selectiteration.DataTextField = "Iteration";
    selectiteration.DataValueField = "ProjectIterationID";
    selectiteration.DataBind();

    //string iteration = selectiteration.SelectedValue;
    //check_iteration.Text = iteration;
}
</code></pre>
