Good,
I created an ASP: NET WEB Core 2.0 Appl.
I created views and controllers.
When I make a submit via:
<form asp-controller="Audit" asp-action="Search" method="post">
Instead of opening via (controller Audit, IAction, search, return View ()) the Audit / view page at
http://localhost:62857/Home/Audit
tries to open (with error)
http://localhost:62857/Audit/Search
.
The same goes for other views.
What am I doing wrong?
NOTA1 : I do not have enough experience (yet) to use routes and maps.
NOTE2 : If I use eturn Content ("AOC") I will see the AOC.
'Audit.cshtml' form asp-controller="Audit" asp-action="Search" method="post" > div class="row"> input type="search" id="inputSearch" name="inputSearch"> input type="Submit" value="Search ..." > / div > / form
AuditController Public IActionResult Search (string inputSearch) { ViewBag.Search = inputSearch;
// return View("Index");
// return View();
// return Content("test audit");
return View("~/Views/Home/Audit");
}
Thanks for the attention