hello, i have been try to retrieve the data from the database, but it results in Empty = "Enumeration yielded no results" any solutions. here is my code,
public void DiametrDropDown()
{
// string CS = ConfigurationManager.ConnectionStrings[""].ConnectionString;
// string data = "select PHYSICAL_ID,SUBSTRING(MODEL,6,len(MODEL)) as Model from PHYSICAL_DATA_PSYCHOLMETRICS as P";
SqlCommand cmd = new SqlCommand("select PHYSICAL_ID,SUBSTRING(MODEL,6,len(MODEL)) as Model from PHYSICAL_DATA_PSYCHOLMETRICS as P", conn);
conn.Open();
DDLDiameter.DataSource = cmd.ExecuteReader();// where the result from the query is assigned to the dropdown id
DDLDiameter.DataTextField = "Model";
DDLDiameter.DataValueField = "PHYSICAL_ID";
DDLDiameter.DataBind();
conn.Close();
}

Jenith ThakkarRank #789 · 2.9K reputationPosted Sep 4, 2018, 9:35 PM EDT
And Try again
Rafnas T PRank #280 · 8.8K reputationPosted Sep 5, 2018, 12:15 AM EDT