Let’s say I currently have a Controller with the following Action:
public ActionResult Index() {
return View();
}
I’d like to know if instead of this, I could have something like
public ActionResult Index(MyModel model) {
return View();
}
where the model is in some way already filled up with data stored in the cookies.
Nope. It would have to be a [HttpPost] action.
As far as I know,
[HttpGet], which is the default if you don’t specify an attribute, can only take simple value types.