protected void imgDelete_Click(object sender, System.Web.UI.ImageClickEventArgs e) { GridViewRow gvRow = (GridViewRow)((Control)sender).Parent.Parent; int ProductId = gvProductDetails.DataKeys(gvRow.RowIndex).Value; Productdal objProductdal = new Productdal(); bool blnsuccess = false; blnsuccess = objProductdal.DeleteData(ProductId); if (blnsuccess) { BindGridView(); } }
No comments:
Post a Comment