I have this AddSection method
public ActionResult AddSection(string code, ArrayList added)
{
ArrayList list = added;
if (list == null) list = new ArrayList();
list.Add(Request["selected_section"]);
return RedirectToAction("Details", new { code = code, added = list });
}
Forwarding to details:
public ActionResult Details(string code, ArrayList added)
{
if (added == null) added = new ArrayList();
return View(added);
}
Now in the Details action (if it is displayed from AddSection), the "added" ArrayList should never be empty, since it is still initialized in AddSection and passed to the details. When I debug the add program, the ArrayList in Details is null, even if the action was shown after AddSection.
Can someone explain why?
source
share