Solved

Page Refresh

Posted on 2011-02-27
6
341 Views
Last Modified: 2012-05-11
How can I refresh the loginView control in an asp.net 4.0 web page with an interval of 1min?
please provide a c# sample.

thanks

ayha
0
Comment
Question by:ayha1999
  • 3
  • 2
6 Comments
 
LVL 23

Expert Comment

by:Rajkumar Gs
ID: 34991207
You mean just refresh the page that contains LoginView control ?
What's the purpose for that ?

Raj
0
 
LVL 23

Expert Comment

by:Rajkumar Gs
ID: 34991218
If you want to just refresh the page, put a meta refresh tag (in ASPX page)

<meta http-equiv="refresh" content="60">

Open in new window

for refresh in every 60 seconds

Raj
0
 
LVL 7

Author Comment

by:ayha1999
ID: 34991224
Just the loginView control using update panel and timer. not the entire page. In out asp.net intranet application the timeout is half an hour. after that user need to login again. if a page is open for some without refresh, user will not know whether he logged out or not. I wan to avoid it and inform user, his status every min.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 23

Accepted Solution

by:
Rajkumar Gs earned 125 total points
ID: 34991252
This tutorial from msdn could guide you for that.

Raj
0
 
LVL 8

Expert Comment

by:Anurag Agarwal
ID: 34998623

<html>
<head>
<script type="text/JavaScript">
function timedRefresh(timeoutPeriod) {
      setTimeout("location.reload(true);",timeoutPeriod);
}
</script>

</head>
<body onload="JavaScript:timedRefresh(5000);">
This page will refresh every 5 seconds. This is because we're using the 'onload' event to call our function. We are passing in the value '5000', which equals 5 seconds.

</body>
</html>
0
 
LVL 7

Author Closing Comment

by:ayha1999
ID: 35020487
thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

785 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