umair mohsin

umair mohsin

  • 1.3k
  • 351
  • 56.2k

record not shown

Mar 2 2017 10:31 AM
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 

Answers (9)