I am having some trouble saving the state of my current view.
Currenly I have several selectlist calling their own Action
method on the controller that returns the Index
view with the filtered model based on the values of the selectlist.
I have also written a little FileResult action that creates a csv file based on the current model. But I am only covering one selectlist right now as I only save the value of selectList1 into the session and access it with Session["SelectListValue1"]
- What are the best practices in this situation?
- Should I redo the entire (each action for each SelectList) part?
- Should I save each SelectLists value into the session and check if it's null?
- Or should I just save the
Lambda Expression
into the session and modify it during every call?