2

I have probably worded the question badly, but couldn't figure out how to phrase it.
I have an ASP.NET webpage with a number of update panels and timers to trigger events, but it seems I must be missing something in my implementation, because the behaviour I'm observing can't be right.
I've noticed that every time my Timer fires a tick event I get a new script tag in the <head> section of my page with the following code:

<script type="text/javascript">
    Sys.Application.add_init(function() {
        $create(Sys.UI._Timer, {"enabled":true,"interval":1000,"uniqueID":"ctl00$ContentPlaceHolder$missionControl$missionDataControl$MissionTimer"}, null, null, $get("ctl00_ContentPlaceHolder_missionControl_missionDataControl_MissionTimer"));
    });
</script>

I figure that code should be added to the page on the first load, but it shouldn't keep duplicating, should it? It's probably something really basic, but what am I missing?

death_au
  • 1,282
  • 2
  • 20
  • 41

1 Answers1

0

There was something causing an update within an UpdatePanel where it shouldn't have been, and was causing some unusual updating duplication. Fixing that problem seemed to resolve this issue, and no one seemed inclined to comment, so this is being marked as closed

death_au
  • 1,282
  • 2
  • 20
  • 41
  • Had exact same symptom described above..Found it was due to my (mis)use of a timer. I needed to set it as 'AsyncPostBackTrigger' under the '' UpdatePanel property. See this [SO](http://stackoverflow.com/a/12572527/731081) posting for more info. – sonyisda1 Oct 04 '16 at 20:18