xxxxxxxxxx
public static string ActionLink(this HtmlHelper htmlHelper,
string linkText,
string controllerName,
string actionName,
object values,
object htmlAttributes)
xxxxxxxxxx
@Html.ActionLink("Delete", "DeleteList", "List", new { ID = item.ID, ListID = item.id }, new {@class= "delete"})
xxxxxxxxxx
@Html.ActionLink("Details", "Details", new { TransdateID = item.transdate, SectorID = item.sectorid /* id=item.PrimaryKey */ }, null) |
xxxxxxxxxx
Html.ActionLink(article.Title,
"Login", // <-- Controller Name.
"Item", // <-- ActionMethod
new { id = article.ArticleID }, // <-- Route arguments.
null // <-- htmlArguments .. which are none. You need this value
// otherwise you call the WRONG method ...
// (refer to comments, below).
)
xxxxxxxxxx
<li data-active="resources">@Html.ActionLink("Resources", "Resources", "Home", new { area = "" }, new { @class = "nav-link text-dark" })</li>