日期:2014-05-17  浏览次数:20651 次

MVC无法找到资源
同一个控制器下:可以../../Site/Site找到资源,但是用../../Site/Site_Insert却找不到资源,这是什么原因啊?
        public ActionResult Site()
        {
            return View();
        }

        [HttpPost]
        [ValidateInput(false)]
        public ActionResult Site_Insert()
        {
            var json = new JsonResult();
            try
            {
                var dal = new Archives_SiteDAL();
                var model = new Archives_SiteModel();
                model.site = Request.Params["site"];
                model.comment = Request.Params["comment"];
                json.Data = new { iserr = false, msg = "添加成功!", id = dal.Add(model) };
            }
            catch (Exception ex)
            {
                json.Data = new { iserr = true, errmsg = ex.Message };
            }
            return json;
        }
MVC

------解决方案--------------------