here was my code from view
@{ var companies = (IEnumerable<Company>)ViewData["companylist"]; }
@foreach (var item in companies)
{
//post the form to upload actions, index2 for testing
<form id="submitfinal" method="post" asp-action="Upload" asp-controller="report" enctype="multipart/form-data">
<input type="hidden" name="companyid" value="@item.Id" />
@item.Name (@item.Status)
<input type="file" name="files" />
<input name="submit" type="submit" value="upload final report" />
</form>
}
Question here was how can i take the data from input tag attribute to controller? let say the @item.Id is 1234, how i get that in controller?