Automatic Refresh of asp.net page based on timer

jensenpeach

New Member
I need to automatically refresh a datagrid when there has been no activity for n minutes. I have looked at the server timer control but could not find a way to automatically refresh the page(datagrid) when the timer_elapsed event is triggered. Using <META HTTP-EQUIV="REFRESH" CONTENT="20"> or onload="timer=setTimeout('timer()',20000)" will not suffice because this will refresh the page when the user is in the middle of entering data or interacting with the page. Any help would be appreciated.I have not found a solution using the server timer control as of yet. I did get the refresh to work using JavaScript. Using the setTimeout and clearTimeout I am able to create an idle timer. Every time the user interacts with the app, I reset the timer.I don't think doing this on the server would help. You'd have to somehow "push it" out to the client which I don't is possible. A periodic refresh would have to be forced somewhere on the client side (w/ Javascript, WSH, etc.)
 
Back
Top