Click here to Skip to main content
15,902,939 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
@model Tuple<ilist><models.getsubjects_result>, IList<models.getenteredmarkslist_result>
// This data belongs to GetEnteredMarksList_Result modal

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

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

}

@i@Model.Item2[i].htno
@Html.HiddenFor(m=>m.Item2[i].htno)
@Html.EditorFor(m =>m.Item2[i].marks, new
{@maxlength="3",@style="width:75px;"})
@Html.LabelFor(m=>m.Item2[i].sname )
<input type="submit" value=" SAVE " onclick='confirm("Are you sure you want save?")'
class="btn-success" style="height:40px;"/>


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

}
Posted
Updated 24-Nov-14 2:08am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900