My View is
@model IEnumerable<Trials.ViewModels.PList>
@foreach (var item in Model) {
string target = "";
if (ViewBag.func == "Screening")
{
target = "DivDialogDiv_Scrng";
}
else if (ViewBag.func == "Eligible")
{
target = "DivDialogDiv_Eligible";
}
<tr>
<td>
@Html.DisplayFor(modelItem => item.UnitNo)
</td>
<td>
@Html.DisplayFor(modelItem => item.PName)
</td>
<td>
@Html.DisplayFor(modelItem => item.PAge)
@Html.HiddenFor(x=> item.PAge)
</td>
<td>
@Html.ValueFor(modelItem => item.StartDate, "{0:dd/MM/yyyy}")
</td>
<td>
@Html.ValueFor(modelItem => item.EndDate, "{0:dd/MM/yyyy}")
</td>
<td>
<b>@Ajax.ActionLink("Screen", "getQuestions", "Screening",new AjaxOptions { HttpMethod = "GET", LoadingElementId="divLoading", UpdateTargetId =@target, InsertionMode = InsertionMode.Replace,OnSuccess="openDialog"})</b>
@Html.HiddenFor(modelitem=> item.TId)
@Html.HiddenFor(x=> item.Status_Id)
@Html.HiddenFor(x=> item.UnitNo)
@Html.HiddenFor(x=> item.ResponseID)
</td>
</tr>
}
</tbody>
</table>
and in the controller i receive as
public ActionResult getQuestions(T.ViewModels.PList pl)
{
List<PatientQuestions> model = rep.getQuest(pl.TId,User.Identity.Name);
return PartialView("_getQuestions",model);
}
The problem is that I am getting 0 and null values in the controller . Though I pass as hidden but still in controller I am not getting any values passed from View