public ActionResult DeleteQuery() { int UserID = AJA_Core.CurrentUser.UserId; int SearchID = Convert.ToInt32((Session["ManageQuery"] as SearchBL.ManageQuery).SearchId); bool delQuery = SearchBL.DeleteQuery(SearchID, UserID); alert(new MyResult() { Tittle = "Delete Query", Message = "Query Deleted Successfully", restype = true }); return(RedirectToAction("MyQueries", "MyQueries")); }