Is there a way to return an ActionResult from Controller B called from Controller A while providing a specific model to B?

前端 未结 4 721
耶瑟儿~
耶瑟儿~ 2021-01-19 01:51

Let\'s say I have a controller:

public BController : Controller
{
    public ActionResult Foo(FooViewModel vm)
    {
       ...
    }
 }

an

4条回答
  •  花落未央
    2021-01-19 02:07

    Have a look at this URL which explains how to pass parameters when redirecting from one action to another: http://jonkruger.com/blog/2009/04/06/aspnet-mvc-pass-parameters-when-redirecting-from-one-action-to-another/

    Hope this is helpful for you.

提交回复
热议问题