• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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