-1
的模型我打電話KitchenController從的HomeController,我怎麼能得到KitchenController的模型的HomeController。調用另一個控制器,並得到所謂的控制器
public void KichenDetails(string KichenId)
{
if (string.IsNullOrEmpty(KichenId))
KichenId = "";
var result = new KitchenController().Index(KichenId);
result.Model.;// result contains model and other details as well
}
我想你會從這裏得到幫助[鏈接](https://stackoverflow.com/questions/16870413/how-to-call-another-controller-action-from-a-controller-in- mvc) –
** [類似這樣](https://stackoverflow.com/questions/15385442/passing-data-between-different-controller-action-methods)** –