I have an ajax form as following:
@using (Ajax.BeginForm("Action", "Ctrler", null, new AjaxOptions { UpdateTargetId = "divSendML" }, new { id = "frmSendML" }))
{
<div id="divSendML">
@Html.EditorFor(x => x.SomeProperties)
...
<div id="divPreview"></div>
</div>
}
Then I call an jquery post to update the content of tag divPreiview, I want to post the content of this ajax form:
function PreViewGenerateHtml() {
var form = $("#frmSendML");
$.post("/Ctrler/Action",
form.serializeArray(),
function (data) {
$("#divPreview").html(data);
});
}
[HttpPost]
public ActionResult Action(ActionModel model)
{
}
On server side, why the mapped model doesn't have value for SomeProperties.