@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 [email protected], 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>
하고 컨트롤러에서 나는 문제는 내가 0과 null 값을 얻고 있다는 점이다
public ActionResult getQuestions(T.ViewModels.PList pl)
{
List<PatientQuestions> model = rep.getQuest(pl.TId,User.Identity.Name);
return PartialView("_getQuestions",model);
}
으로 받기 컨트롤러에서. 컨트롤러로 숨겨져 있지만 여전히 전달 된 값은 없습니다.보기
감사합니다. – Khan