I have an ActionResult calling another ActionResult.
I have an ActionResult call in my case that does not work. Here is what I have:
public ActionResult GetReport(string pNum) { .... switch (methodId) { case 1: case 5: { var actionResult = GetP1Report("33996",false) as ActionResult; break; } } return actionResult; }
I get the following error: "actionResult" does not exist in the current context
If I do the following, this works, but not quite what I need:
public ActionResult GetReport(string pNum) { .... var actionResult = GetP1Report("33996",false) as ActionResult; switch (methodId) { case 1: case 5: {
How to get actionResult to work in my case statement so that it is visible when I do
return actionResult
source share