To be more specific let me explain what did I encounter. I was trying to submit a List of data from view to controller. I was able to submit some data successfully without any problem. But the problem arises when the data is more than around a list of 250 items and more than that. When I click a submit button it passes a NULL value when I debug it. There is no error with my code because I have submitted a list of 100 items to the controller without any problem. I guess there will be something that I have to specify so that It will also send a large number of lists. Here I'm not using ajax or any javascript code to submit the form. I'm submitting it directly to the controller using post request.
I have posted some snippet of my code below to describe it more precisely.
View
<form method="post" action="SubmitList">
<div class="row">
<div class="col-md-12" style="padding-top:1%">
<input type="submit" value="PASS" class="btn btn-primary" style="float:right;" />
<div class="box-body">
<table id="#example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>No</th>
<th>Name</th>
</tr>
</thead>
<tbody>
@{
int i = 1;
}
@for (int j = 0; j < Model.Count(); j++)
{
<tr>
<td>@Html.Raw(i++)</td>
@Html.HiddenFor(item => item[j].Id, new { htmlAttributes = new { @class = "form-control" } })
<td>
@Html.DisplayFor(item => item[j].FullName)
</td>
</tr>
}
</tbody>
<tfoot>
</tfoot>
</table>
</div>
</div>
</div>
</form>
Controller
[AuthorizedAction]
[HttpPost]
public async Task<IActionResult> SubmitList(List<Student> students)
{
////
}
Can you tell me what's wrong with my code, please