摘要: Controller中的Edit方法 [HttpPost] publicActionResultEdit(Commentcomment){if(ModelState.IsValid){db.Entry(comment).State=EntityState.Modified;db.SaveChanges();returnRedirectToAction("Index");}ViewBag.UserId=newSelectList(db.Users,"UserId","Email",comment.UserId);ViewBag.Post 阅读全文
posted @ 2012-06-27 23:02 月小 阅读(872) 评论(0) 推荐(0) 编辑