There is a controller, in which the GetAllPurchaseList method is defined, when switching to it, the system looks for a view named GetAllPurchaseList.cshtml. Having a view with this name is not very convenient, is it possible to tell the controller method to select a different view? I tried through Route, but for some reason it did not work out.

    1 answer 1

    Controllers / HomeController

    public ActionResult GetAllPurchaseList() { return View("MyView", new MyModel()); } 

    Views / Home / MyView.cshtml

     @model MyModel; //html