I am using a custom column with a link. I have a value tool ID that I need to pass into the link.
Here is my code:
<e-grid-columns>
<e-grid-column field = "ToolID" headerText="Test" template="#temp" width="50" ></e-grid-column>
</e-grid-columns>
I have tried this:
<script id="temp" type="text/x-template">
<a rel='nofollow' href="@Url.Action("AddTest", "Home", new {toolID = "${ToolID}"})"> <span class="bi-plus-circle-fill" aria-hidden="true" title="Create new Test"></span> </a>
</script>
and this:
<h4
title="Create New Test"> @Html.ActionLink("",
"AddTest","Home", "${ToolID}",new {@class=
"bi-plus-circle-fill" }) </h4>
They both go to the page but the ToolID value is always 0.
Homecontroller.ccs
public IActionResult AddTest(int toolID)
{
return View();
}