Click here to Skip to main content
15,123,923 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need help.
i have two views one is main and other is partial.
on main view i have this:
@model  DataBase.Poll
  @Html.HiddenFor(model => model.Poll_ID)
  @Html.TextBoxFor(model => model.Poll_Question)
  @Html.Action("Epollvote", "AdminCustomer", new { id = @Model.Poll_ID })

now on Epollvote action
public PartialViewResult Epollvote(int id)
  var q = from d in _db.Poll_Answer where d.Poll_ID == id select d;
  return PartialView("~/Views/Admin/Poll/EResultVote.cshtml",q.ToList());

and on EResultVote.cshtml partial view i have:
@model IEnumerable<database.poll_answer>
@foreach (var item in Model)
  @Html.HiddenFor(model => item.Poll_Ans_ID)
  @Html.TextBoxFor(model => item.Answer)

and finally what i want is to access these above fields details in SavePollDetials action. currently i have this but send model is null. i'm using entity framework and these poll and poll_answer are entities.
public ActionResult SavePollDetials(Poll model,IEnumerable<poll_answer> model1)
  return view();
Updated 10-Feb-15 3:12am

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