5
我正在嘗試爲支持asp-hash
屬性的a
標籤創建自定義ASP.NET核標籤幫助程序。該屬性應該做的只是將提供的值附加到href
屬性的末尾。然後使用哈希字符串支持創建自定義錨標籤助手
<a asp-controller="Home" asp-action="Index" asp-hash="mainDiv">some link</a>
會產生:
<a href="http://localhost/home/index#mainDiv">some link</a>
我發現的源代碼AnchorTagHelper
在本節asp.net github repo但我無法找到一個方法來添加東西的末尾生成href
。
愚蠢的我......沒注意到 – VSG24