tags:

views:

20

answers:

1

I want to create a link to a specific div on a view.

I was thinking something along these lines

<a href="<%= Url.Action("#about", "Home") %> > </a>

or

<a href="<%= Url.Action("~/Views/Home/About.ajax/#about")%> >

I know this isn't right. How can I create a link to a div or specific tag on the destination view, in the style of <a name="someTagName"></a>?

+2  A: 

Just add the #about right after the closing %>.

<a href="<%= Url.Action("~/Views/Home/About.ajax/")%>#about">Your link text</a>

Take a look at this question and its answers.

Baddie