[RESOLVED]Unable to Get My View Data into Controller when page submitted I am using Tuple modal

 @model Tuple<IList<Models.GetSubjects_Result>, IList<Models.GetEnteredMarksList_Result> >

<table><tbody>

// This data belongs to GetEnteredMarksList_Result modal

@using (Html.BeginForm("SaveMarks", "College", FormMethod.Post))
{

@for (int i =1; i < Model.Item2.Count; i++)
{

<tr>
<td>@i</td>
<td>

@Model.Item2[i].htno
@Html.HiddenFor(m=>m.Item2[i].htno)
</td>
<td>
@Html.EditorFor(m =>m.Item2[i].marks, new {@maxlength="3",@style="width:75px;"})

</td>
<td>
@Html.LabelFor(m=>m.Item2[i].sname )
</td>
  </tr>

}

<tr><td><input type="submit" value="  SAVE  " onclick=’confirm("Are you sure you want save?")’ class="btn-success" style="height:40px;"/>

</td></tr>

</tbody><table>

At Controller Side :

[HttpPost]
public ActionResult SaveMarks([Bind(Prefix = "Item2")] IList<GetPreparedMarksList_Result> tobj)
{

// here I am Getting null in tobj ??

///How should i get all rows of Data into Controller  Please Help out

}

nrs_asp

@for (int i =1; i < Model.Item2.Count; i++)

start from 0

Thanks for your time,
Except that what you said i=0

is it everything correct at controller side? 
if i write as  

[HttpPost]
public ActionResult SaveMarks([Bind(Prefix = "Item2")] GetPreparedMarksList_Result tobj)
i am getting single row data ,

but i need all rows data , 

coud you suggest right way

Thanks a lot , it is working fine

Leave a Reply