protected void btnDelete_Click(object sender, EventArgs e) { try { Int32 DistrictID = Globals.GetIntFromQueryString("DistrictID"); OtherFunctions obj = new OtherFunctions(); obj.DeleteDistrict(DistrictID); LoadGridViewItem(); } catch { } }
protected void gridViewItem_RowDeleting(object sender, GridViewDeleteEventArgs e) { try { GridViewRow row = gridViewItem.Rows[e.RowIndex]; Int32 DistrictID = Convert.ToInt32(((Label)row.Cells[0].FindControl("lblDistrictID")).Text); OtherFunctions obj = new OtherFunctions(); obj.DeleteDistrict(DistrictID); LoadGridViewItem(); } catch { } }