• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

Page Refresh

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
ayha1999
Asked:
ayha1999
  • 3
  • 2
1 Solution
 
Rajkumar GsSoftware EngineerCommented:
You mean just refresh the page that contains LoginView control ?
What's the purpose for that ?

Raj
0
 
Rajkumar GsSoftware EngineerCommented:
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
 
ayha1999Author Commented:
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
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
Rajkumar GsSoftware EngineerCommented:
This tutorial from msdn could guide you for that.

Raj
0
 
Anurag AgarwalCommented:

<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
 
ayha1999Author Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now