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



Johnie said:

https://www.google.com/maps/place/A-Lumination+Electric/@28.6261166,-81.4522056,17z/data=!3m1!4b1!4m6!3m5!1s0x88e779dff57b7343:0xffc90088f7a2ac2c!8m2!3d28.6261119!4d-81.4496307!16s%2Fg%2F1hc4y6bwy?entry=ttu A-Lumination Electric

Posted On: March 30, 2024 12:17:11 PM

© 2024 - ErnesTech - Privacy
E-Commerce Return Policy