Skip to content

Flash messages lost when set in one action and then displayed after visiting another #1

@rogersillito

Description

@rogersillito

I'm struggling to get FlashMessages working in the way I want: I am expecting that if I set messages in one action, when I visit (either directly or via a redirect) another action they should be displayed (given appropriate view code). I have put together a test project to show this:

https://gist.github.com/rogersillito/e1b84bd325611c04200e

Essentially, the only way I can get a flash message to display is by setting it in an action that returns a view, and then using the HtmlHelperExtensions method to display the messages within that view. Any attempt to set them in actions that redirect to such a view appear to cause the session contents to be lost?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions