In my _Layout.cshtml I write javascript code, that allow me to display modal dialog on the page with form for user login when I click on link, and that is work. My problem is that I want do something like that:
I click on ActionLink, that run code from controller, i.e:
public ActionResult Create()
{
if (Session["UserID"] != null)
{
ViewBag.PlaceID = new SelectList(db.Places, "PlaceID", "Name");
ViewBag.UserID = new SelectList(db.Users, "UserID", "FullName");
return View();
}
else
{
return RedirectToAction("LogIn", "User");
}
}
Anyone have idea, how to change return RedirectToAction("LogIn", "User"); code, for something that show me my modal dialog instead of opening new page for login?