User-1826049516 posted
Hi,
I have an UpdatePanel on each of my content pages. I want to add some form of timer control that can be enabled/disabled by getting the (boolean) value from the database on page load, as well as dynamically updating its Enabled/Disabled state with jQuery.
So the process would be:
full page load get true | false value from db for timer
if enabled run every x seconds, if disabled do nothing
somebody presses the Timer button that toggles the state in the database, and changes the state of the timer without a full page load/postback
if that change is to Enabled begin the timer, if that change is to Disabled stop the timer, both without a full page load/postback
If I use ASP.NET's Timer control, I can do the first part easily by populating the Enabled property with the value from the database. But, can client-side code dynamically change its state?
I am already doing 'manual' jQuery UpdatePanel postbacks elsewhere using this, so I wonder if a custom jQuery timer would be better:
page._doPostBack( 'ctl00$header$Search_Button', '' );
But can I enable/disable such a timer dynamically as well, and on page load?
Open to suggestions.
Thanks