You are using a tag helper.
With tag helpers, you insert attributes directly into the view body as raw HTML attributes:
<a asp-action="MyTestAction"
asp-controller="Home"
asp-route-myid1="a"
asp-route-myid2="b"
class="foo"
disabled
data-whatever="@razor_expression">Test</a>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.