So I've already done it, but is there any other way without '.cshtml' extension ?
https://i.sstatic.net/ENehE.png
[HttpGet("erm/nama-project/dashboard")]
public IActionResult Index()
{
ViewBag.Current = "Dashboard";
return View("/Views/Nama-Project/index.cshtml");
}
If you only want to remove cshtml
extension while specifying the view name, you can create a base controller and override View method as shown below:
public override ViewResult View(string nameWithoutExtension)
{
return base.View($"{nameWithoutExtension}.cshtml")
}