here is my code
SqlConnection conn = new SqlConnection(ConStr1);
conn.Open();
SqlCommand cmd = new SqlCommand("select * from emplyees", conn);
cmd.CommandType = CommandType.Text;
SqlDataAdapter sda = new SqlDataAdapter();
DataSet ds = new DataSet();
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
conn.Close();
i want to display record on a button click event but record is not displaying could anyone help me what should i do?code should examine.furthermore i don't want to use data set

Nilesh ShahRank #42 · 34.2K reputationPosted Mar 2, 2017, 5:45 AM EST
Amit GuptaRank #190 · 12.8K reputationPosted Mar 2, 2017, 7:08 AM EST
umair mohsinRank #3,092 · 463 reputationPosted Mar 2, 2017, 9:31 AM EST
Amit GuptaRank #190 · 12.8K reputationPosted Mar 2, 2017, 9:40 AM EST
umair mohsinRank #3,092 · 463 reputationPosted Mar 2, 2017, 8:05 PM EST
Amit GuptaRank #190 · 12.8K reputationPosted Mar 2, 2017, 8:24 PM EST
Gnanavel SekarRank #333 · 7.5K reputationPosted Mar 2, 2017, 8:27 PM EST
umair mohsinRank #3,092 · 463 reputationPosted Mar 4, 2017, 3:09 AM EST
Bryian TanRank #396 · 6.3K reputationPosted Mar 4, 2017, 7:25 AM EST