I fill the model and the TempData
private const string MyTempModel = "MyTempModel";
[HttpGet]
public ActionResult Abm()
{
var modelo = DependencyContainer.Instance.Resolve<MyModel>();
modelo.Name = "Maxi" ;
modelo.LastName = "Dam";
TempData[MyController.MyTempModel] = modelo;
return View(modelo);
}
And here I want to get the values
[HttpGet]
public ActionResult Save()
{
var model = TempData[MyController.MyTempModel] as MyModel;
return View(model);
}
What I'm doing wrong? I lose all the values...
Thanks