How to auto Refresh my page if any events are not done for a certain time (Period)?

Hi,
 How to auto Refresh my page if any events are not done for a certain time (Period)? I can use Meta tag but the disadvantage is after certain time it will refresh the page, in the refreshing time if some body doing any operation then that data will loose. So pleas tell me another senario for this one.

Thanks
LVL 13
PillalamarriVenkateswaraRaoAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

varungdCommented:
Place a linkbutton in the form and write the codes  in the click event of that linkbutton,  that is what r the functions u need to work if u were using refresh option and use the javascript like

<script > 
window.setTimeout("document.getElementById('LinkButton1').click()", 10000);
</script>
 
0
PillalamarriVenkateswaraRaoAuthor Commented:
Sorry I can't get you. My main intension is if a person keeps the page for a certain time (e.g 30 min) then I want to refresh a page. So I want to check the page is idle for that perticular amount of time (e.g 30 min) if it is idea then i will refresh that page.
Thanks
0
varungdCommented:
Hi
 I am attaching some codes using asp.net ,c# . U try this ... I think there is no other ways for doing this.

webconfig
 
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="2" />
 
HTML
  <body id ="by" runat="server">
 
 
form Page_load
 
  int timeOut = ((Session.Timeout - 1) * 1000) * 60;
            by.Attributes.Add("onLoad", " window.setTimeout('Redirect();'," + timeOut + ")");
 
javascript
 
<script >
function Redirect()
{
    window.location.href="map.aspx";
}
</script>

Open in new window

0
varungdCommented:

webconfig
 
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="31" />
 
HTML
  <body id ="by" runat="server">
 
 
form Page_load
 
  int timeOut = ((Session.Timeout - 1) * 1000) * 60;
            by.Attributes.Add("onLoad", " window.setTimeout('Redirect();'," + timeOut + ")");
 
javascript
 
<script >
function Redirect()
{
    window.location.href="map.aspx";
}
</script>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.