我有一個剃鬚刀鏈接,看起來像這樣:如何在我的asp.net mvc 4 razor鏈接中使用DISQUS count鏈接?
@Html.ActionLink("Comment", "Comment", new { id = item.NewsId })
在Disqus安裝信息,它說:
將您的網站的關閉標籤之前,下面的代碼:
<javascript>
我已經做到了。
於是說第2步:
追加#disqus_thread
在你的鏈接href屬性。這將告訴Disqus哪些鏈接查找並返回評論數量。
例如:<a href="http://foo.com/bar.html#disqus_thread">Link</a>
問題
如何添加#disqus_thread
當我使用的HtmlHelper擴展?
我已經試過
@Html.ActionLink("Comment", "Comment", new { id = item.NewsId + "#disqus_thread" })
但產生:
<a href="/Home/Comment/4656%23disqus_thread">Comment</a>
你想幫忙什麼? – SLaks
我更新了問題 – Obsivus