protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { SPSite siteCollection = new SPSite(SPContext.Current.Web.Url); using (SPWeb web = siteCollection.OpenWeb()) { SPListItemCollection listItems = web.Lists["FinalList"].Items; int itemCount = listItems.Count; GridViewRow row = GridView1.Rows[e.RowIndex]; if (e.RowIndex < itemCount) { listItems.Delete(e.RowIndex); Label1.Text = "Done! "; } GridView1.Dispose(); web.Close(); web.Dispose(); } }
Response.Redirect(Request.URL.ToString())
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)