I have an actionlink that, when clicked, im passes the list of objects to the controller action.
Example:
View:
Html.ActionLink("TestLink", "TestMethod", "Test", Model.SampleList, null)
TestController:
public ActionResult TestMethod(List<SampleList> sampleList)
{
return View(sampleList);
}
When I do this, I get a null sampleList. I can only transfer one complex object, not its collection. Do I need the correct routing? The reason I do this is that instead of passing the identifier and searching in the controller action, I just pass the data.
user300956
source
share