I'm trying to implement a temporary splash-page which will be shown if a session variable and a property is set to true. I check this variable in the default action, like so:
public ActionResult Index(StartPage currentPage)
var model = PageViewModel.Create(currentPage);
// warning page should be shown and the user hasn't dismissed it yet
if (model.Settings.ShowWarningPage && Session["SkipWarningPage"] == null)
if (model.Settings.ShowWarningPage && Session["SkipWarningPage"] != null && !bool.Parse(Session["SkipWarningPage"].ToString()))
if (model.Settings.TextWarningPage != null)
return View("Warning", model);
Then I return the appropiate view depending on the result.
What I now need is to set the session value to false if the user clicks a link on the "Warning"-view page. The link should then point the user to the StartPage.
My problem is: How do you easiest make a link that sets the session value to true and redirects the user the the StartPage?
I will creat a new action where I will set the session value and will redirect where I require.