9
Answers

record not shown

umair mohsin

umair mohsin

8y
636
1
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)