when i debug below code it not showing any errors but dropdownlist is not populating with data
public void BindDropDownListData()
{
string Connection = System.Configuration.ConfigurationManager.ConnectionStrings["Conn"].ConnectionString;
SqlConnection cn = new SqlConnection(Connection);
try
{
cn.Open();
SqlCommand mySqlCommand = new SqlCommand("Select ProjectName from ProjectsTable", cn);
SqlDataAdapter mySqlDataAdapter = new SqlDataAdapter(mySqlCommand);
DataSet myDataSet = new DataSet();
mySqlDataAdapter.Fill(myDataSet);
DropDownList2.DataSource = myDataSet;
DropDownList2.DataTextField = "ProjectName";
DropDownList2.DataBind();
}
catch (Exception ex)
{
...
Go to the complete details ...