I call an action method with a jquery post :
$('#selector').click(function (event) {
var jqxhr = $.post("/MyController/MyAction", $("form").serialize(),
function (data) {
$('#myDIV').html(data); //ok here
// Missing code, display text from my model in another div
});
});
At “Missing code”, I’d code to show a text (present in the model) in another div.
Any idea ?
Thanks,
If the data is in your model, create a hidden field to hold the data:
Then just get the data from it: