// Soft-delete this User in the database protected void DeleteBtn_Click(object sender, EventArgs e) { int batchId = Int32.Parse(Security.GetQueryString()); // Soft delete batch in Database if (BatchService.DeleteBatch(batchId)) { Response.Redirect("Default.aspx?message=BatchDeleteSuccess"); } else { Response.Redirect("BatchDetail.aspx?id=" + batchId + "&message=DeleteError"); } }