InvalidOperationException: Cannot override the 'href' attribute for <a>. An <a> with a specified 'href' must not have attributes starting with 'asp-route-' or an 'asp-action', 'asp-controller', 'asp-area', 'asp-route', 'asp-protocol', 'asp-host', 'asp-fragment', 'asp-page' or 'asp-page-handler' attribute.


Question: How do you resolve the error that says "InvalidOperationException: Cannot override the 'href' attribute for <a>. An <a> with a specified 'href' must not have attributes starting with 'asp-route-' or an 'asp-action', 'asp-controller', 'asp-area', 'asp-route', 'asp-protocol', 'asp-host', 'asp-fragment', 'asp-page' or 'asp-page-handler' attribute."



Login to See the Rest of the Answer

Answer: Make sure that if you have an #href in the link tag you do not need to have an attribute starting with asp-* because the #Tag Help starting with asp- constructs the href.


MVC
published
v.0.01




© 2024 - ErnesTech - Privacy
E-Commerce Return Policy