Juddson Ivines Juddson Ivines - 1 year ago 128
ASP.NET (C#) Question

Trying to add anchor links from other pages to my mvc link

This is my link on our company's asp.net-mvc site:

@Html.ActionLink("OPIE Administrative & Compliance Track", "Index", "OPIECon")

I'm fairly new to mvc and am having difficulty finding answers on my own. Right now the link is working fine and directs me to the OPIECon index page. However, I want it to take me to an anchor link ("admin") I've set up on the OPIECon index page. How do I format the above link to make that work?

Answer Source

You can use one of the overloads that accepts a fragment

@Html.ActionLink("OPIE ... Track", "Index", "OPIECon", null, null, "admin", null, null)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download