コード例 #1
0
 public ActionResult Index(SessionMessageViewModel vm)
 {
     ViewBag.Message = "Message page.";
     _sessionMessageManager.SetMessage(vm.Type, vm.Behaviors, vm.Message);
     //return RedirectToAction("About");
     return(View(vm));
 }
コード例 #2
0
        public ActionResult Index()
        {
            var vm = new SessionMessageViewModel {
                Type = MessageType.Success, Behaviors = MessageBehaviors.StatusBar
            };

            return(View(vm));
        }
コード例 #3
0
 public ActionResult AjaxMessage([FromBody] SessionMessageViewModel vm)
 {
     _sessionMessageManager.SetMessage(vm.Type, vm.Behaviors, vm.Message);
     return(View("Index"));
 }