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. timer on webpage

timer on webpage

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasevisual-studiodebugging
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.
  • K Offline
    K Offline
    kd8341
    wrote on last edited by
    #1

    Hi, I try to put a timer on my webpage, and my purpose is to trigger an update of certain content of this page. So I "new" a asp.net web application in Visual Studio.net2003 and "drag and drop" a "timer" component from toolbox to the webform. set "interval" to "2000" and "enable" it. But it doesn't works. If I debug it, looks like the timer doesn't run in the normal style. Does anybody encounter this problem before? Is there a better way to make a webpage update periodically by itself? Thanks. Regards Kevin

    M 1 Reply Last reply
    0
    • K kd8341

      Hi, I try to put a timer on my webpage, and my purpose is to trigger an update of certain content of this page. So I "new" a asp.net web application in Visual Studio.net2003 and "drag and drop" a "timer" component from toolbox to the webform. set "interval" to "2000" and "enable" it. But it doesn't works. If I debug it, looks like the timer doesn't run in the normal style. Does anybody encounter this problem before? Is there a better way to make a webpage update periodically by itself? Thanks. Regards Kevin

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      Hey, Kevin. It sounds to me like you want something that will function client-side -- the three types of timers in .NET (in the namespaces System.Windows.Forms, System.Timers, and System.Threading are all server-side. In the context of your ASP.NET page, the server-side processing functions to generate markup to send back to the client. If you wanted to trigger activity client-side, you could do so with the javascript function setTimeout(). There are lots of examples around - Google for "javascript timer" or "javascript setTimeout" and you'll find a bunch. Here's an example of one: http://www.mcfedries.com/JavaScript/timer.asp[^]

      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