How to specify the view location in asp.net core mvc when using custom locations?

前端 未结 8 2152
死守一世寂寞
死守一世寂寞 2020-11-30 22:59

Let\'s say I have a controller that uses attribute based routing to handle a requested url of /admin/product like so:



        
8条回答
  •  一向
    一向 (楼主)
    2020-11-30 23:41

    In .net core you can specify the whole path to the view.

    return View("~/Views/booking/checkout.cshtml", checkoutRequest);

提交回复
热议问题