public ActionResult Index(Guid?id) { if (id != null) { ViewBag.Model = dao.GetNote(id.Value); } Session["CAPTCHA"] = GetRandomText(); return(View()); }
public ActionResult Edit(Guid?id) { if (!User.Identity.IsAuthenticated) { return(RedirectToAction("DangNhap", "Login")); } if (id == null) { return(RedirectToAction("Index")); } var model = dao.GetNote(id.Value); return(View(model)); }