Create a T4MVC ActionLink with hash/pound sign)

Posted by Dan Atkinson on Stack Overflow See other posts from Stack Overflow or by Dan Atkinson
Published on 2010-05-27T12:19:29Z Indexed on 2010/05/27 12:21 UTC
Read the original article Hit count: 499

Is there a way to create a strongly typed T4MVC ActionLink with a hash in it?

For example, here is the link I'd like to create:

<a href="/Home/Index#food">Feed me</a>

But there's no extension to the T4MVC object that can do this.

<%= Html.ActionLink("Feed me", T4MVC.Home.Index()) %>

So, what I end up having to do is create an action, and then embed it that way:

<a href="<%= Url.Action(T4MVC.Home.Index()) %>"#food>Feed me</a>

This isn't very desirable. Anyone have any ideas/suggestions?

Thanks in advance

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about T4MVC