Timer Event

asp.net United States
  • 18 years ago

    I have just started a project which we are planning on developing in ASP.Net. Most of the project is pretty simple, there is one key aspect which I am not sure how to make happen, your assistance is appreciated:


    I need to mimmick the functionality of a timer control on an ASP page. I need there to be a trigger every so many seconds or a minute where the program checks our primary database for a specific value, once that value is in the database then the code would trigger an event which will load a new page depending on what value is in the database. I am not sure how to build the code to make the timer execute without the end user ever knowing it was querying the database, because until it finds the value it is searching for the page should stay the same.


    I look forward to your response and assistance, thanks...Gene

  • 18 years ago

    The only way to do this is to constantly refresh the page until the said conditions are met but that would be a very unenjoyble experience for the user.
    The whole idea of designing an application for the web is to move the mindset away from the windows application environment and understand what a web application is. Asp.Net does not change what the user will be working with as an end result, i.e. the html that is sent to your client. This is a static (bar any javascript) interface more or less so you need to be inovative. Perhaps using a small iframe in your page and refreshign it (using javascript?) might be the best solution.
    Also ask yourself the question - is this the only way I can do this? Re-evaluate the end result required and consider how necessary it is to have a client interface that only sends a user to a page under certain circumstances.
    e.g. send a user an email when the page is available.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Walking on water and developing software from a specification are easy if both are frozen.” - Edward V Berard