Exemple #1
0
        public ViewResult Mensaje()
        {
            ContextMessage msg = (ContextMessage)TempData[User.Identity.Name];

            return(View(ContextMessage.ViewLocation(this), msg));
        }
Exemple #2
0
        public ViewResult Mensaje()
        {
            ContextMessage msg = TempData.ContainsKey(User.Identity.Name) && TempData[User.Identity.Name].GetType() == typeof(ContextMessage) ? (ContextMessage)TempData[User.Identity.Name] : new ContextMessage();

            return(View(ContextMessage.ViewLocation(this), msg));
        }