private void ChapterDelete() { using (var helper = new DbHelper.ActAndRes()) { var chapterId = Request.QueryString["bcId"]; var bookId = Request.QueryString["bId"]; var subId = Request.QueryString["SubId"]; var secId = Request.QueryString["secId"]; var deleted = helper.DeleteChapter(Convert.ToInt32(chapterId)); if (deleted) { Response.Redirect("~/Views/ActivityResource/Book/BookView.aspx?arId=" + bookId + "&SubId=" + subId + "&secId=" + secId); } else { lblError.Visible = true; } } }