public ActionResult RemoveBook(int id) { if (BookCRUD.DeleteBook(id)) { return(Content("<script>alert('Book Deleted Successfully.');window.location.href=document.referrer;</script>")); } else { return(Content("<script>alert('Book could not be found.');window.location.href=document.referrer</script>")); } }