title: Timer issue in UpdatePanel Asp.net C#
body: <p>i have an update panel with Timer, by defualt timer interval is 60 secs, I have 15 buttons on page, on each button click i want to assign timer interval 30 seconds, so each button click will give 30 seconds more until if not then timer_tick is called which will disable Timer and perform other works. Other buttons are not part of TimerUpdatePanel. On button clicks timer is not updating,  Please Advise. Thanks</p>
  
  <p>My Aspx Code:</p>
  
  <pre><code>&lt;asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"&gt;
  &lt;/asp:ScriptManager&gt;
  &lt;asp:Timer ID="Timer2" runat="server" Enabled="False" Interval="60000" OnTick="Timer2_Tick"&gt;&lt;/asp:Timer&gt;
  &lt;asp:UpdatePanel runat="server" ID="updatePanelTimer2" UpdateMode="Conditional"&gt;
      &lt;Triggers&gt;
          &lt;asp:AsyncPostBackTrigger ControlID="Timer2" EventName="Tick" /&gt;
      &lt;/Triggers&gt;
      &lt;ContentTemplate&gt;
          &lt;%--&lt;p id="myTimer" runat="server" style="text-align: right; padding-right: 40px;"&gt;&lt;%= Timer2.Interval.ToString() %&gt;&lt;/p&gt;--%&gt;
      &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  </code></pre>
  
  <p>Code behind Button_Click</p>
  
  <pre><code>int timer = 30;
  Timer2.Interval = timer * 1000;
  updatePanelTimer2.Update();
  </code></pre>
  
  <p>Code of Timer_Tick</p>
  
  <pre><code>protected void Timer2_Tick(object sender, EventArgs e)
  {
      Timer2.Enabled = false;
      Session.Clear();
      Session.Timeout = 1;
      Session.RemoveAll();
      Session.Abandon();
      Response.Redirect("~/TestPage.aspx");
  }
  </code></pre>