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

return Content("0")

以前只看到Return view,return Content("0")百度下,就是返回一个文本,这个文本谁来接收呢? 返回后页面是个什么效果?


        [HttpPost, ValidateInput(false)]
        public ActionResult Show(int id, FormCollection values)             
        {
            try
            {
                RegisteredUser va = GetCurrentUser();           
                if (va != null)
                {
                    var cm = new Comment();                               
                    cm.VideoID = id;                                      
                    cm.Content = values["Content"];                       
                    if (CommentBLL.AddComment(cm) == 1)
                        return PartialView("UCC",
                                           GetPagedCommentsAndRepliesByVideoId(cm.VideoID, 1, CommentPageSize));
                    return Content("0");   
                }
                return Content("-1");
            }
            catch (Exception ex)
            {
                return Content(ex.Message);
            }

        }

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