This is why you would like to use the model and query string: querystring allows you to tell the user how to save the URL with status information. The model allows you to transfer a lot of uncompressed data. So, Iβm thinking how to do this in MVC 5 (it may not work for older versions, but it probably does):
For presentation, use 2 actions, not 1. use one first to set querystring via RedirectToAction. Use the second action to return the model to the view. And you pass the model from the first action to the second action through the session state. Here is a sample code:
public ActionResult Index(string email){ Session["stuff"]=Load(email); return RedirectToAction("View1action", new { email = email, color = "red" }); } public ActionResult View1action(string email){ return View("View1",(StuffClass)Session["stuff"]); }
source share