I have 2 actions within the same controller.
public ActionResult Index(string filter, int[] checkedRecords)
and
public ActionResult ExportChkedCSV(string filter, int[] checkedRecords)
The second Action (ExportChkedCSV) contains this redirect:
if (reject != 0)
{
return RedirectToAction("Index", new { filter, checkedRecords });
}
When I step through, the parameter checkedRecords is populated correctly on the RedirectToAction statement, but when it hits the Index ActionResult from there, checkedRecords is null. I’ve tried doing filter =, checkedRecords =, etc. I am having no problem with this from View to Controller. If I change the array type to anything else, I can grab the value – how do I pass int[] from action to action? What am I doing wrong? Thank you
You can’t send complex types as redirect parameters in MVC, only primitive types like numerics and strings
Use TempData to pass the array