private void cmbCustomer_SelectedIndexChanged(object sender, EventArgs e)
{
//id = Convert.ToInt64(cmbCustomer.SelectedValue);
DataSet ds = new DataSet();
SqlCommand cmd = new SqlCommand("select * from RM_Customer where custID ='" +Convert.ToInt64(cmbCustomer.SelectedValue) + "'", cn);
cn.Close();
cn.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
txtaddress.Text = dr["custAddress"].ToString();
}
dr.Close();
cn.Close();
}
Unable to cast object of type 'System.Data.DataRowView' to type 'System.IConvertible'