View: @model IEnumerable<VOC.Models.QuestionnaireFeedback> @{ ViewBag.Title = "Index"; } @using (Html.BeginForm("updateFeedback", "Questionnaire", FormMethod.Post)) { @foreach(var item in Model){ @Html.DisplayFor(modelItem => item.ProjectID) @Html.DisplayFor(modelItem => item.FeedbackNo) @Html.EditorFor(modelItem => item.Answer) } <input type="submit" value="Save" /> } Controller: <pre>[HttpPost] public ActionResult updateFeedback(List<QuestionnaireFeedback> fromQuestionnaire) { if (ModelState.IsValid) { FeedbackBusinessLayer feedbcakBusLayr = new FeedbackBusinessLayer(); feedbcakBusLayr.updateFeedback(fromQuestionnaire); return RedirectToAction("Index"); } return View(db.QuestionnaireFeedbacks.ToList()); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)