How do I refresh a page in ASP.NET? (Let it reload itself by code)
I\'d rather not use Response.Redirect() because I don\'t know if the page I will be on, as it\'s i
Once the page is rendered to the client you have only two ways of forcing a refresh. One is Javascript
setTimeout("location.reload(true);", timeout);
The second is a Meta tag:
<meta http-equiv="refresh" content="600">
You can set the refresh intervals on the server side.
You can't do that. If you use a redirect (or any other server technique) you will never send the actual page to the browser, only redirection pages.
You have to either use a meta tag or JavaScript to do this, so that you can reload the page after it has been displayed for a while:
ScriptManager.RegisterStartupScript(this, GetType(), "refresh", "window.setTimeout('window.location.reload(true);',5000);", true);