2009-07-18 17 views

cevap

7

jQuery Forms plugin ve ASP.NET MVC eylem işini yapmalıdır:

setInterval(function() { 
    $('#theFormToSave').ajaxSubmit({ 
     url : 'SaveDraft', 
     success: function (data, textStatus) { 
      if (data.success) { 
       alert('form successfully saved'); 
      } 
     } 
    }); 
}, 30000); 
:
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 }); 
} 

Ve View

sadece periyodik olarak bu eylemi çağırmak