public ViewResult Mensaje() { ContextMessage msg = (ContextMessage)TempData[User.Identity.Name]; return(View(ContextMessage.ViewLocation(this), msg)); }
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)); }