// GET: Home public ActionResult Index() { if (User.Identity.IsAuthenticated && Cookies.IsEditUser && Cookies.IsChangeRoom) { return(Redirect("OrderRoom/Index")); } else if (User.Identity.IsAuthenticated && !Cookies.IsEditUser && !Cookies.IsChangeRoom) { return(Redirect("OrderRoom/Index")); } string result = "Вы не авторизованы 123"; if (User.Identity.IsAuthenticated) { result = "Ваш логин: " + User.Identity.Name; } else { return(Redirect("Account/Login")); } HomeTest homeTest = new HomeTest { Text = result }; return(View("Index", homeTest)); }
public ActionResult Proba() { string result = "ПРивет"; HomeTest homeTest = new HomeTest { Text = result }; return(View(homeTest)); }
public ActionResult Index() { var test = new HomeTest { Header = "Test Me" }; ViewBag.Title = "Home Page"; ViewBag.Test = test; return(View()); }