protected void CompanyDropDown_Click(object sender, EventArgs e)
{
string connectionString = ConfigurationManager.ConnectionStrings["DBConnection"].ConnectionString;
using (SqlConnection cn = new SqlConnection(connectionString))
{
SqlCommand cmd = new SqlCommand("[dropdownCompany]", cn);
cn.Open();
CompanyDropDown.DataSource = cmd.ExecuteReader();
CompanyDropDown.DataBind();
}
}
The stored procedure dropdownCompany is just one column with a list of company names.
For some reason this is not populating the drop down when I execute the web form.