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. web auto reload

web auto reload

Scheduled Pinned Locked Moved ASP.NET
csstutorial
2 Posts 2 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.
  • H Offline
    H Offline
    hg2705
    wrote on last edited by
    #1

    Does anyone know if there is a smal project here to show how a webpage with a data grid autoreload. A want to give the user the funktion to stop and start the autoreload and how often the reload should happend. If there is'n. can som one show me how to do this. Happy coding!

    S 1 Reply Last reply
    0
    • H hg2705

      Does anyone know if there is a smal project here to show how a webpage with a data grid autoreload. A want to give the user the funktion to stop and start the autoreload and how often the reload should happend. If there is'n. can som one show me how to do this. Happy coding!

      S Offline
      S Offline
      SABhatti
      wrote on last edited by
      #2

      do you mean you want to refresh/reload the page automatically after some time span? And in some cases you want the user interaction to start or stop refreshing the page or set the time span for refreshing the page? I think on refreshing the page, datagrid will automatically reloaded from the database, right..:-D If so you can use javascript functions window.setTimeout and window.clearTimeout. The functions take milliseconds as input time, so value for one second is 1000 and one minute is 60000. Here is an example: var tiemout = 300000; // refresh the page every 5 minutes var refreshID = start(); //window.setTimeout(refreshPage,timeout); function refreshPage(); //refresh page { windoe.location.reload(); } function reset(timeval) { timeout = timeval * 60000; //assuming you will take input in minutes stop(); start(); } function stop() { window.clearTimeout(refreshID); } function start() { window.setTimeout(refreshPage,timeout); } ----- -- modified at 10:31 Friday 21st October, 2005</x-turndown>

      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