I using Jquery tabs plugin to have tabs in my view.
I want <li><a href="../JobDetails/Index/1234">JobDetails</a></li> as my first tab.
For this I am doing
<li>@Html.ActionLink("JobDetails",
"Index", // <-- ActionMethod
"JobDetails", // <-- Controller Name.
new { id = 1234 }
)</li>
But I view source show me this link
<li><a href="/Coordination?Length=10" id="1234">JobDetails</a></li>
where Coordination is my controller name and I am having these tabs on Coordination controller and Action name(ViewName) is Index.
I am not sure why I am geting Controller name as Coordination even i name it as JobDetails.
That’s because you are using the wrong overloaded method. Try this instead:
Your original overloaded method is this:
As you can see from the above parameter names, you are passing in “JobDetails” as your link text, so on and so forth. That’s why you’re getting the rendered markup.
But by using this overload, you just need to pass
nullfor thehtmlAttributesobject to get your desired markup: