c# - ASP.net MVC Keeping Session Alive -
i trying find way keep session alive when controller taking long time come results. javascript on button click looks below:
function onclick(s, e) { positiondate = reportingpositiondate.getdate().todatestring(); if (true) { $.ajax({ type: "post", url: "@url.action("datafileupload", "importdata")", data: json.stringify({ positiondate: positiondate }), datatype: "text", contenttype: "application/json; charset=utf-8", beforesend: function () { lpimport.show(); }, success: function (msg) { debugger; importdatagridview.performcallback(); importsuccessmessage.setvisible(true); importsuccessmessage.settext(msg); lpimport.hide(); }, error: function (xhr) { alert(xhr) importdatagridview.performcallback(); } }); } } basically session times out before success. silently keep session alive. all.
Comments
Post a Comment