[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2008-11-12
4
Medium Priority
?
574 Views
Last Modified: 2013-11-23
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
0
Comment
  • 3
4 Comments
 
LVL 5

Expert Comment

by:varungd
ID: 22948028
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
 
LVL 13

Author Comment

by:PillalamarriVenkateswaraRao
ID: 22948077
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
 
LVL 5

Expert Comment

by:varungd
ID: 22948719
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
 
LVL 5

Accepted Solution

by:
varungd earned 2000 total points
ID: 22948734

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.
Suggested Courses
Course of the Month20 days, 4 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question