Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to refresh page using c# int every five minutes?

Tags:

c#

asp.net

How to refresh page using c# in every five minutes in ASP.NET?

like image 613
Kamal Deepak Avatar asked Aug 31 '12 06:08

Kamal Deepak


People also ask

How to refresh the page c#?

You can try with Response. Redirect() method at the server side or use Form.

How to refresh a page in asp Net using c# Code?

Response. Write("<script type='text/javascript'> setTimeout('location. reload(true); ', timeout);</script>"); Put the above code in button click event or anywhere you want to force page refresh.

Is page refresh a postback?

A refresh mean a complete reload of the page, without any form data. This is essentially an HTTP GET . A post back is when the page is posted to itself (through the form action="" ). This is essentially an HTTP POST .

How do I use response redirect?

Response. Redirect sends an HTTP request to the browser, then the browser sends that request to the web server, then the web server delivers a response to the web browser. For example, suppose you are on the web page "UserRegister. aspx" page and it has a button that redirects you to the "UserDetail.

How do I force a page to refresh?

Windows — Press Ctrl + F5. If that doesn't work, hold down Ctrl and click the "Refresh" icon. Mac — Press ⌘ Command +⇧ Shift + R. In Safari, you can also hold ⇧ Shift and click the "Refresh" icon. Troubleshoot a page which won't refresh.

How to refresh a page after some action in JavaScript?

If we want to refresh a page after some action here is one of the simplest way to do it. First of all create a function called RefreshPage as shown in below snapshot..

How to refresh the page after a post is posted?

Posting back from any control will run the page lifecycle and refresh the page. To do it from javascript, you can just call the __doPostBack () function. Show activity on this post. Show activity on this post. Depending on what exactly you require, a Server.Transfer might be a resource-cheaper alternative to Response.Redirect.

How to refresh a page in Google Chrome on mobile?

How to Refresh Chrome on Mobile 1 Open Google Chrome. Tap the Chrome app icon, which resembles a red, yellow, green,... 2 Go to the page you want to refresh. As with desktop browsers,... 3 This option is in the top-right corner of the screen. Tapping it prompts a drop-down menu. 4 Tap the "Refresh" icon. It's at the top... See More....


2 Answers

One is Javascript:

setTimeout("location.reload(true);", timeout);

The second is a Meta tag:

<meta http-equiv="refresh" content="300">
like image 118
Rejeesh Avatar answered Oct 01 '22 19:10

Rejeesh


Using the following HTML meta tag in your header <META HTTP-EQUIV="REFRESH" CONTENT="300"> should do the trick

like image 40
Jagmag Avatar answered Oct 01 '22 21:10

Jagmag