for intranet application have web page save function can lead substantial action on several database tables. using linq2sql , 20 seconds of browser idle swallowed 3 seperate linq.datacontext.submitchanges()
calls. these calls occur right @ end of code called savebutton postback.
i want actual work needed accumulate these database changes done within save button action. however, given no problems or conflicts detected, redirect user page after (so don't have stare @ screen doing cannot stop. user continues call submitchanges()
.
ideal workflow:
void btnsaveclick() { calculatechangesetprocedure redirect somewhere... submitchangesprocedure }
so problem response.redirect(..., true) shut things down. there way can asp.net procedures or have async on thread?
if trying submit small amount of data idle time have not normal. first thing can check submit function , see there can optimize. example, if submitting 50 rows , call submitchanges after each of them, slow down things significantly. solution in case prepare date , submit @ once.
another option calling service submits changes you. in way saving done asynchronously , not interrupt user. after service done can simple jquery popup or inform user saving completed if important.
Comments
Post a Comment