Refreshing matter
-
Hi, Is there a simple way (meta tag or else) to force a page to be refreshed (ie. dowloaded from sratch) if revisited a second time. Thanks.
Hi, Response.AppendHeader("refresh","1"); write this line of code in the page load event. it automatically refresh the page after every 1 second bye pankaj Take it Easy
-
Hi, Response.AppendHeader("refresh","1"); write this line of code in the page load event. it automatically refresh the page after every 1 second bye pankaj Take it Easy
Thanks, But what I need in fact, is to force refreshing webpages if revisited another time (in the same session). To give you an example, in a webpage page1.aspx I have a label which displays the username (after logging in : login.aspx). When I click Previous ang log in with another username, I get the old username displayed. And I have then to click refresh on the browser to have the right username displayed. Thanks!
-
Thanks, But what I need in fact, is to force refreshing webpages if revisited another time (in the same session). To give you an example, in a webpage page1.aspx I have a label which displays the username (after logging in : login.aspx). When I click Previous ang log in with another username, I get the old username displayed. And I have then to click refresh on the browser to have the right username displayed. Thanks!
You should use the cache directive at the top of the page as follows: <%@ OutputCache Location="None" VaryByParam="None" %> This adds headers to indicate that the page should not be cached at either the server or client end and should be reloaded on each visit. Hope this helps