开发者

moving to page section through URL

开发者 https://www.devze.com 2023-01-07 22:11 出处:网络
I am trying: <%= Html.ActionLink(\"Link Label\", \"Index\", \"controller_name\", new { area = \"AreaName\" }, new { @id = \"documentation\" })%>

I am trying:

<%= Html.ActionLink("Link Label", "Index", "controller_name", new { area = "AreaName" }, new { @id = "documentation" })%>

To create the appropriate html to send the user to the "documentation" part of the web page by rendering the id into the title (i.e. ) and then dropping the "#documentation" onto the end o开发者_StackOverflowf the url like so:

http://localhost/AreaName/controller_name/#documentation

when I type the url by hand the mvc routing sends the browser to the section ok, all I need is a way to make the Actionlink render the html correctly.

Any ideas?


Here is your solution, already solved:

Including an anchor tag in an ASP.NET MVC Html.ActionLink

0

精彩评论

暂无评论...
验证码 换一张
取 消