Making repeatedly calls to async methods can be a nightmare. In this case, it makes sense to use 2 ajax methods, instead of one. Here is a simple solution to overcome this problem. See that ajaxcalls is emptied after the success response for the first ajax call and then the second ajax method is used to make one single call to the async action method. Hope it helps. View: @section Scripts{ < script type ="text/javascript"> var smartDebitObject = new Object(); smartDebitObject.MembershipNumber = $( "#MembershipNumber" ).val(); smartDebitObject.ProfileId = $( "#ProfileId" ).val(); smartDebitObject.FirstName = $( "#FirstName" ).val(); smartDebitObject.LastName = $( "#LastName" ).val(); smartDebitObject.AddressLine1 = $( "#AddressLine1" ).val(); smartDebitObject.Postcode = $( "#Postcode" ).val(); smartDebitObject
Solution Architect | Umbraco Certified Master | Umbraco MVPx3 | Certified ScrumMaster
"Anyone can cook, but only the fearless can be great." Ratatouille