Ajax.BeginForm не обновляет целевой div
Смотреть:
@использование ("Аякс".Бигинформ("AddBranchContact", новый AjaxOptions { HttpMethod = "пост", UpdateTargetId = "section3", onsuccess процедуры = "$('#myModal1').модальные('спрятать');" }))
{}
Модель:
public JsonResult AddBranchContact(BranchViewModel objBranchContact) { List<BranchContact> BranchContactList = new List<BranchContact>(); if (Session["BranchContactList"] == null) { BranchContactList.Add(objBranchContact.BranchContactDetails); Session["BranchContactList"] = BranchContactList; } else { } return Json(BranchContactList, JsonRequestBehavior.AllowGet); }
Смотреть:
@using (Html.BeginForm()) { <div id="section3"><table> </table></div> The results returned from the action below are displayed in tr tds of this table. But when the action method below is called it gets the data but doesnt come back to this part : @using(Html.BeginFOrm()) even though i have given the UpdateTargetID as above. }