I have the following scenario that may warrant storing data in a conroller member variable in order to share it between actions.
I have a search form and a button - when clicked, a table full of data returns according to the search form parameters. One action - all good and clean.
I am now asked to put an excel button so that the user can download the table in excel format. I don't want to run the db query again, since the data is already there, but since I am using a server side Excel component, I need the data to be available on the server in order to shove it into Excel.
My initial idea was to have an extra variable in my controller where the data can be stored. But I have never seen this being done in asp.net MVC. Is this an accepted pattern? My understanding was that each action is sort of isolated.