<a href="@Url.Action("Products", "Home", new {id = "#Specialty"})">
<img class="img-responsive img-thumbnails"
src="@Url.Content("~/images/ChopSaw.jpg")"/>
</a>
我提供的代码将我带到 - website.com/Home/Products/#Specialty
。
如果我想导航到 - website.com/Home/Products#Specialty.
(removed "/" between products & #Specialty)
我该怎么做?我必须保持img/link
的完整性和造型。我花了更多的时间来试图让它发挥作用,而不是我想承认。任何建议将被认真考虑。
答案 0 :(得分:2)
试试这个
<a href='@Url.Action("Products", "Home")#Specialty'>