Let’s say I have a class
public class ItemController:Controller
{
public ActionResult Login(int id)
{
return View("Hi", id);
}
}
On a page that is not located at the Item folder, where ItemController
resides, I want to create a link to the Login
method. So which Html.ActionLink
method I should use and what parameters should I pass?
Specifically, I am looking for the replacement of the method
Html.ActionLink(article.Title,
new { controller = "Articles", action = "Details",
id = article.ArticleID })
that has been retired in the recent ASP.NET MVC incarnation.