Using Umbraco 6.0.5, I have a surface controller method that is updating some membership details after the user posts a form.
At the end of the method, I'm updating my TempData with a message to display to the user. My master layout displays the contents of TempData("CustomMsg") if it's populated. This is working for about 5 other controller methods and views when calling RedirectoToCurrentUmbracoPage().
When I want to redirecto to any other page and I use the method Redirect("page name"), TempData is not displayed by the master layout.
Does anyone know why or what I'm doing wrong? Thanks.
TempData.Add("CustomMsg", newAppMsg() { Type = "success", Msg = "Your email has been updated. Please check your inbox and validate your email before trying to log in again." });
TempData.Keep("CustomMsg");
return Redirect("/login.aspx?signout=true");
There once was a bug with TempData, but I'm not shure if the bug still exists.
Anyway you should ensure that your session is configured properly. Can you once test if you can access and use the Session property of the SurfaceController class for your purpose?
TempData not appearing in Redirect
Hi,
Using Umbraco 6.0.5, I have a surface controller method that is updating some membership details after the user posts a form.
At the end of the method, I'm updating my TempData with a message to display to the user. My master layout displays the contents of TempData("CustomMsg") if it's populated. This is working for about 5 other controller methods and views when calling RedirectoToCurrentUmbracoPage().
When I want to redirecto to any other page and I use the method Redirect("page name"), TempData is not displayed by the master layout.
Does anyone know why or what I'm doing wrong? Thanks.
Anybody have a clue as what I'm doing wrong? I can provide more information if that would help?
There once was a bug with TempData, but I'm not shure if the bug still exists.
Anyway you should ensure that your session is configured properly. Can you once test if you can access and use the Session property of the SurfaceController class for your purpose?
is working on a reply...