MVC return View expression (string viewName) in the viewName

First, create a file in the folder Views Other, and then create a Index.cshtml

In the return View HomeController Index Action may be as follows

return View("../Other/Index");

return View("/Views/Other/Index.cshtml");

 

 

Guess you like

Origin www.cnblogs.com/hycms/p/12498845.html