Reputation: 15237
I want to generate a link like this:
http://localhost:5013/Home/Glossary#Agnikumara
I do not mean the id on the resulting anchor tag, like:
<a href="/home/glossary" id="Agnikumara">Link</a>
I want the resulting link to be: http://localhost:5013/Home/Glossary#Agnikumara
how do I do that in .NET Core MVC?
I keep searching, but I always get the thing that I don't want, i.e. an id on the actual anchor tag.
Upvotes: 0
Views: 449
Reputation: 5719
Use asp-fragment
<a asp-controller="Home"
asp-action="Glossary"
asp-fragment="Agnikumara">Link</a>
Upvotes: 2