public ActionResult Login(Osiris.CloudWeb.Models.UserInfo user) { string uName = user.UserName.Trim(); string uPassword = Commons.Get_MD5(user.Password.Trim()); Osiris.BLL.UserInfo bll = new BLL.UserInfo(); string r = bll.CheckUserInfo(uName, uPassword); if (r.Equals("success")) { Session["UserName"] = uName; Session["Eare"] = "上海市"; return(Redirect("/home/index")); } else { // var scripts = string.Format("alert('{0}');", r); // return Content(string.Format("<script>alert('{0}');</script>", r)); Response.Write(string.Format("<script>alert('{0}');</script>", r)); return(View("login")); } }