Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Website timer tick makes buttons unresponsive

Posted on 2014-08-28
Medium Priority
Last Modified: 2015-04-25

I have a ASP.NET C# website which has a timer that ticks every 0,8 seconds. When it ticks, it gets a value from an SQL database, and updates a textbox (which is in an UpdatePanel) with the new value. This part works well, and the value on the screen is updated fairly smoothly. I disable the timer at the start of its tick and enable it again when the value in the textbox have been updated to avoid "double-ticks" if the sql server responds to slow.

My problem is that I have several buttons on my site, and they do not always responed when they are clicked. If I increase the time between timer ticks, the problem with unresponsive buttons goes away, so I supect that the unresponsiveness of the buttons are due to the site being busy with handling the timer tick.

UPDATE: The buttons DO respond to clicks, but with the timer set to 0,8 seconds, they respond very slowly (I guess they are waiting for the timers Tick event to finish).

Is there a way around this? I cannot make the timer tick less frequently, as I need the value from the database to be shown in as "real time" as possible.
Question by:poultarp
  • 2
LVL 84

Expert Comment

by:David Johnson, CD, MVP
ID: 40289893
run the timer asyncronously not syncronously or in its own thread and not in the UI thread.

Accepted Solution

poultarp earned 0 total points
ID: 40733334
Problem was solved by moving all code on button click into JQuery/JSON.

Author Closing Comment

ID: 40743791
The problem was resolved with out using the single input from user on site.

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month13 days, 3 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question