解决方法
jQuery Forms plugin和ASP.NET MVC操作应该完成这项工作:
@H_403_8@public ActionResult SaveDraft(FormCollection form)
{
// TODO: Save the form values and return a JSON result
// to indicate if the save went succesfully
return Json(new { success = true });
}
在您的视图中,只需定期调用此操作:
@H_403_8@setInterval(function() { $('#theFormToSave').ajaxSubmit({ url : 'SaveDraft',success: function (data,textStatus) { if (data.success) { alert('form successfully saved'); } } }); },30000);