`

[AcceptVerbs(HttpVerbs.Post)]

阅读更多
搞了那么久用浏览器居然访问不了Login页面,偶要晕咯,原来加了[AcceptVerbs(HttpVerbs.Post)]东东,居然是button才能访问的

[AcceptVerbs(HttpVerbs.Post), Authorize]
        public ActionResult Login(string gg, string psword)
        {
            // string rr = Request.QueryString(id);
            if (gg == "admin" && psword == "123")
            {
                return View();
            }
            else
            {
                this.ModelState.AddModelError("msg", "你妹");
                return View("Yu");
            }


        }

0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics