public ActionResult Index(bool store = false, bool abandon = false)
 {
     if (store)
     {
         SessionStateHelper.Set(SessionStateKeys.NAME, "Adam");
     }
     if (abandon)
     {
         Session.Abandon();
     }
     return(RedirectToAction("Index"));
 }
Ejemplo n.º 2
0
        public ActionResult Index(Article article)
        {
            //return View();
            //return HttpNotFound();
            article.Title   = "Test Title";
            article.Created = DateTime.Now;
            //article.Content = "";
            article.Modified = DateTime.Now;

            Article articleWithId = _repository.Insert(article);

            _repository.Save();


            SessionStateHelper.Set(SessionStateKeys.NAME, articleWithId);
            return(RedirectToAction("Edit", "AdminArticle"));


            //return View();//redirect to edit and pass article in session
        }
 public ActionResult ProcessFirstForm(string name)
 {
     System.Diagnostics.Debug.WriteLine("Name: {0}", (object)name);
     SessionStateHelper.Set(SessionStateKeys.NAME, name);
     return(View("SecondForm"));
 }
 public ActionResult ProcessFirstForm(string name)
 {
     SessionStateHelper.Set(SessionStateKeys.NAME, name);
     return(View("SecondForm"));
 }