Is there a way to pass entire object from ASP.NET MVC 5 View to a Controller? This is my situation:
Assuming that your Update View isn't of type IEnumerable...
You just need to pass the ID
of the record that you want to send to the Update view...
Like so:
@Html.Action("Update me!", "Update", new { id = item.ID })
Then your Update action would look like this:
[HttpGet]
public ActionResult Update(int id)
{
var parameter = db/* connection string variable */.TableName.Find(id);
return View(parameter);
}
Then your link should work appropriately.
Hope this helps!