Here is a basic sample code
// In the controller add post method
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> CalcLineAmount(int qty,int price)
{
SalesOrderLine line = (SalesOrderLine)TempData["lineedit"];
line.LineAmount = qty * price;
TempData["SalesOrderID"] = line.SalesOrderID;
TempData["lineedit"] = line;
return PartialView("~/Views/SalesOrders/_FormLine.cshtml", line);
}
// call in chtml
@Html.ActionLink("Update", "CalcLineAmount", new { Model.Qty, Model.Price })