ASP.Net Core 2.2 Razor View Routing for Partial View not working


Question: ASP.Net Core 2.2 Razor View Routing for partial view not working


Login to See the Rest of the Answer

Answer: Look carefully in your asp-controller="ControllerName" asp-action="ActionName"
              - Chances are that the Action Name specified in an asp-action tag is not accurate, look again, and                         then look again.
               -Another chance is that, you renamed or overridden the Action Name or the Controller Name in the                    Controller. Look again, and then double check.
Solution: You will have to reference the actual name of the Action and the actual name of the Controller in your link tag e.g. 

//Considering this code is in a Partial View
<a asp-controller="ActualNameOfTheControllerAndNotThePrefixedName" asp-action="ActualNameOfTheActionAndNotThePrefixedOne" asp-route-ParameterName="PassInYourParameterOrArgumentInHere" asp-route-AnotherParameterName="PassAnotherParameterInHere">LinkName</a>





For peering opportunity Autonomouse System Number: AS401345 Custom Software Development at ErnesTech Email AddressContact: [email protected]