Ahmad Nahazi
Ahmad Nahazi

Reputation: 3

Asp.net mvc core TagHelpers not working Suddenly after migration

Have a project with Entity Framework Core and asp.net mvc core. This project was working correctly. But when removed migration folder from Data layer and then update DB, suddenly showed me an error like this :

Cannot override the 'href' attribute for . An 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.

Actually I want to open a view with <a asp-action="..." ...> from home controller to another controller in a area. please help me.

enter image description here

Upvotes: 0

Views: 350

Answers (1)

NeGa TiV
NeGa TiV

Reputation: 3

I ran into a similar problem. If you have asp-route="@something.Id" in your project, modify it to asp-route-id="@something.Id".

Upvotes: 0

Related Questions