-1

Appears: An unhandled exception occurred while processing the request. InvalidOperationException: The view '/OGS/Route.cshtml' was not found. The following locations were searched: /OGS/Route.cshtml

Although the file is present on the first path: Nop.Web => Areas => Admin => Views => OGS => Route.cshtml

Here is the controller code,

public class OGSRoute : BaseAdminController
{
  public virtual async Task<IActionResult> Index()
  {
    return View("/OGS/Route.cshtml");
  }
}
s.k.Soni
  • 1,139
  • 1
  • 19
  • 37

2 Answers2

2

Please try this viewName: Areas/Admin/Views/OGS/Route.cshtml

public virtual async Task<IActionResult> Index()
{
    return View("Areas/Admin/Views/OGS/Route.cshtml");
}
Tanzim Siddiqee
  • 532
  • 3
  • 14
1

Change like below

  public partial class OGSRouteController : BaseAdminController
    {
        public virtual async Task<IActionResult> Index()
        {
            return View("Areas/Admin/Views/OGS/Route.cshtml");
        }
    }
sina_Islam
  • 1,068
  • 12
  • 19