ASP.NET MVC开发,编辑页面和添加页面基本相同,我们控制器 Add Edit是共用同一个View吗?

http://q.cnblogs.com/q/51693/

这种的话,一般公用就好了。,如下的写法:

 [HttpGet]
        public ActionResult UserManage(int userId=0)
        {
            if (userId==0)
            {
                return ActionResult(new UserInfo());
            }
            else {
                ViewBag.IsEdit = true;
                return ActionResult(GetUserInfo(userId));
            }
        }
        [HttpPost]
        public ActionResult UserManage(UserInfo model,bool isEdit)
        {
            if (isEdit)
            {
                do something...
            }else
            {
                 do something...
            }
        }