私はasp.netのDropDownListのデータをバインドしています。コードは機能していないようです。 エラーは Click here to see the error, data does not appearDropDownList Databindエラー
「ユーザー」という表に3つのエントリがあります。 接続文字列が正しい、私は肯定的です。
SqlConnection ddlcon = new SqlConnection(strncon);
ddlcon.Open();
SqlCommand cmd = new SqlCommand("Select Username from Users", ddlcon);
SqlDataAdapter ddlAdp = new SqlDataAdapter(cmd);
DataTable ddl = new DataTable();
ddlAdp.Fill(ddl);
ddlMembers.DataSource = ddl;
ddlMembers.DataBind();
ddlcon.Close();
なぜ「javascript」にタグを付けましたか? –