[AcceptVerbs(HttpVerbs.Post)]_.NET_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > .NET > [AcceptVerbs(HttpVerbs.Post)]

[AcceptVerbs(HttpVerbs.Post)]

 2010/11/16 11:45:42  qq398705749  http://qq398705749.javaeye.com  我要评论(0)
  • 摘要:搞了那么久用浏览器居然访问不了Login页面,偶要晕咯,原来加了[AcceptVerbs(HttpVerbs.Post)]东东,居然是button才能访问的[AcceptVerbs(HttpVerbs.Post),Authorize]publicActionResultLogin(stringgg,stringpsword){//stringrr=Request.QueryString(id);if(gg=="admin"&&psword=="123"){returnView(
  • 标签:HttpVerbs
搞了那么久用浏览器居然访问不了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");
            }


        }

  • 相关文章
发表评论
用户名: 匿名