Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Refreshing matter

Refreshing matter

Scheduled Pinned Locked Moved ASP.NET
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    benqazou
    wrote on last edited by
    #1

    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.

    P 1 Reply Last reply
    0
    • B benqazou

      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.

      P Offline
      P Offline
      P A N K A J
      wrote on last edited by
      #2

      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

      B 1 Reply Last reply
      0
      • P P A N K A J

        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

        B Offline
        B Offline
        benqazou
        wrote on last edited by
        #3

        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!

        A 1 Reply Last reply
        0
        • B benqazou

          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!

          A Offline
          A Offline
          Ach1lles
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups