Calling View of different folder from Asp.net mvc4 controller

前端 未结 2 963
陌清茗
陌清茗 2021-01-03 23:28

I hava a View Name \"Message\" in the Jobs folder of Views. And I want to return that view form an action of different controller, named \"MarketController\"



        
2条回答
  •  误落风尘
    2021-01-04 00:17

    Just use a relative path based on the Views folder

    return View("~/Views/Jobs/Message.cshtml");   
    

提交回复
热议问题