public ActionResult Create(Library.Reply reply) { if (!ModelState.IsValid) { return(View("Create")); } ReplyWeb replyWeb = new ReplyWeb(); replyWeb.AddReply(reply); return(RedirectToAction("Index")); }
public ActionResult Create(Library.Reply reply, int?messageId) { if (!ModelState.IsValid) { return(View("Create")); } if (messageId == 0) { return(View("Index", "Message")); } ReplyWeb replyWeb = new ReplyWeb(); replyWeb.AddReply(reply); //return RedirectToAction("Index", "Message"); return(RedirectToAction("Index", "Message")); }