display Records in ComboBox
eBankMainSqlCon.DataCon();
string UsrName = Convert.ToString(comboBox1.Text);
SqlCommand CmdList = new SqlCommand("spUserList",eBankMainSqlCon.SqlCon);
CmdList.CommandType = CommandType.StoredProcedure;
SqlDataReader ReadRdr = CmdList.ExecuteReader();
while (ReadRdr.Read())
{
comboBox1.Text = ReadRdr["UserName"].ToString();
}
ReadRdr.Close();
Hi..I want to display all user in my ComboBox1..but it could not work
pls..help me
|