Trouble with UpdatePanel in an ASP.NET WebForms solution -
so have mixed situation here , thought on right track doesn't seem working out.
so here want.....
i have webpage uses map plot point. not want interfere user doing, want periodically check database see if there need update points. no need = start timer over. have update = auto trigger click event of "refresh" button user can manually click on.
here road was\am trying ....
so have ui working want. have update panel contains javascript countdown timer. when timer up, triggers "click" event of hidden button. code-behind checks database.
if no update in database, there nothing callback returns update panel , timer starts over.
here not working....
if there update, code behind calls needed routine redoes on page (e.g. rebuilds map , such). problem though code runs, page doesn't reload.
i'm assuming because whole updatepanel workflow designed ignore page updates effect objects not inside update panel.
i post code, there isn't any. on form have page bunch of stuff. on page there updatepanel contains javascript , label (to display timer countdown user).
in code_behind hidden button (that called javascript), there simple code like.....
if (pageneedstobeupdated() == true) { buildpage(); }
so when statement false...everything works. when true, need entire page reload.
thanks....and if i'm totally going wrong way, i'm totally willing go different direction.
you can use timer control under updatepanel control , set interval property of timer specific time interval. put logic in timer_tick event. @ particular time interval updatepanel updated.
Comments
Post a Comment