Monday, 23 February 2015

How to bind data in gridview

   SqlCommand cmd = new SqlCommand("select * from table",con");
        SqlDataAdapter sda = new SqlDataAdapter(cmd);
        DataSet ds = new DataSet();
        sda.Fill(ds);
        gridemployee.DataSource = ds; //Grid view bind
        gridemployee.DataBind();

No comments:

Post a Comment