public ActionResult DelUserMethod() { int id = Convert.ToInt32(Request["id"]); IUserInfoBLL userInfoBLL = new UserInfoManager(); UserInfo us = userInfoBLL.LoadEntity(u => u.Id == id).FirstOrDefault(); if (userInfoBLL.DeleteEntity(us)) { return(Content("<script>alert('删除成功!');window.location.href='/Home/MyTest';</script>"));//刷新页面 } else { return(Content("<script>alert('删除失败!');history.go(-1);</script>"));//不刷新退回页面 } }