Net Core Mvc 6
I have a Menu like this
<li class="active nav-item h5"><a class="nav-link link-light aEmployer" asp-controller="Employer" asp-action="Index">Employer Setup</a></li>
That returns a View
I need to call this from Ajax.
I sow this and what it says to do
$.ajax({
// edit to add steve's suggestion.
//url: "/ControllerName/ActionName",
url: '<%= Url.Action("ActionName", "ControllerName") %>',
success: function(data) {
alert(data);
}
});
But in this case, it returns a PartialView.
What I need is to return a View.. the same View that is returned when the user click the Option Menu.
What I need is something like ('aa').click() but it does not work in this case...
It is a way to call it?
Thanks