1
Answer

ASP.NET MVC using Jquery

Can anyone please tell me the logic to pass the values of the sequence number from view to controller as a json object and it should not allow the duplicate values of sequence no
 
 
 
<table class="table" id="tabPerson">
<tr>
<th id="personId">
@Html.DisplayNameFor(model => model.personId)
</th>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.mobileNo)
</th>
<th>
@Html.DisplayNameFor(model => model.HowManyAddress)
</th>
<th>
@Html.DisplayNameFor(model => model.sequenceNo)
</th>
<th></th>
</tr>
@{
var i = 0;
foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.personId)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.mobileNo)
</td>
<td>
@Html.DisplayFor(modelItem => item.HowManyAddress)
</td>
<td>
<input type="text" value="@Html.DisplayFor(modelItem => item.sequenceNo)"      id="sequenceNo_@i" />                                          //how to pass this sequence no values to controller using json object and it should not contain duplicate values
 
</td>
</tr>
i++;
}
}
 
Answers (1)