Ho un ActionResult che chiama un altro ActionResult.MVC ActionResult chiama un altro ActionResult
Ho una chiamata a un ActionResult nella dichiarazione del mio caso che non funziona. Ecco quello che ho:
public ActionResult GetReport(string pNum)
{
....
switch (methodId)
{
case 1:
case 5:
{
var actionResult = GetP1Report("33996",false) as ActionResult;
break;
}
}
return actionResult;
}
ottengo il seguente errore: 'ActionResult' non esiste nel contesto attuale
Se faccio la seguente funziona ma non del tutto quello che mi serve:
public ActionResult GetReport(string pNum)
{
....
var actionResult = GetP1Report("33996",false) as ActionResult;
switch (methodId)
{
case 1:
case 5:
{
// var actionResult = GetP1Report("33996",false) as ActionResult;
break;
}
}
return actionResult;
}
Come faccio ad avere l'ActionResult a lavorare nel mio caso tale affermazione che è visibile quando faccio
return actionResult
hai considerato 'RedirectToAction'? – MilkyWayJoe