Multiple UpdatePanels with its own Timer

How do i have several updatepanels on individual timers

Page 1 of 1

0 Replies - 1451 Views - Last Post: 16 November 2009 - 12:07 PM Rate Topic: -----

#1 woodjom   User is offline

  • D.I.C Addict
  • member icon

Reputation: 34
  • View blog
  • Posts: 566
  • Joined: 08-May 08

Multiple UpdatePanels with its own Timer

Posted 16 November 2009 - 12:07 PM

How do i get it so that i can have mutliple update panels, each with its own timer.

I currently have one update panel in the masterpage that is ticking at 1,000ms and then i have another content page that has its own update panel and i want to tick it at 10,000ms. Currently the way it is implemented, they both tick at 1,000ms.

...
<%@ Register Src="~/controls/header.ascx" TagName="header" TagPrefix="intra" %>
...
<div id="divHeader" style="text-align: center; position: absolute; top: 30px; left: 211px; right: 10px;">
  <intra:header ID="hdrMain" runat="server" />
</div>
...


<td style="width: 300px">
  <asp:Timer ID="tmrHeader" runat="server" Interval="1000">
  </asp:Timer>
  <asp:UpdatePanel ID="updpnlHeader" runat="server">
    <Triggers>
      <asp:AsyncPostBackTrigger ControlID="tmrHeader" EventName="Tick" />
    </Triggers>
    <ContentTemplate>
      <asp:Label ID="lblTime" runat="server"></asp:Label>
    </ContentTemplate>
  </asp:UpdatePanel>
</td>


<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/template.Master"
	CodeBehind="proddata.aspx.vb" Inherits="intranet.proddata" %>
...
<asp:Content ID="Content1" ContentPlaceHolderID="cphBody" runat="server">
  <asp:Timer ID="timerProdData" Interval="10000" runat="server">
  </asp:Timer>
  <asp:UpdatePanel ID="updpnlProdData" runat="server">
    <Triggers>
      <asp:AsyncPostBackTrigger ControlID="timerProdData" EventName="Tick" />
    </Triggers>
    <ContentTemplate>
      <asp:Panel ID="pnlLine1" runat="server" />
      <asp:Panel ID="pnlFillerMill" runat="server" />
      <asp:Panel ID="pnlLine2" runat="server" />
    </ContentTemplate>
  </asp:UpdatePanel>
</asp:Content>



In either case the Tick events are just handled but not coding.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1