public void deleteLV(string query) { if (con.State != ConnectionState.Open) { con.Open(); } SqlDataAdapter da = new SqlDataAdapter(query, con); DataTable dt = new DataTable(); da.Fill(dt); DeleteBookLV.DataSource = dt; DeleteBookLV.DataBind(); con.Close(); }
protected void DeleteBookLV_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e) { (DeleteBookLV.FindControl("DataPager1") as DataPager).SetPageProperties(e.StartRowIndex, e.MaximumRows, false); deleteLV("select * from Add_Book where isActive ='0' "); }