title: TextBox loses its focus when timer is ticking
body: <p>I put a timer control on a specific section on my page, but every time the timer is ticking, my text box (I have multiple text boxes) in another section loses it focus.</p>
  
  <p>How can I resolve this? I tried placing the timer in a separate update panel.
  the code in timer Tick event is</p>
  
  <pre><code> protected void Timer1_Tick(object sender, EventArgs e)
      {
          if ((List&lt;AllPostInformation&gt;)Session["AllNewsPostCollection"] != (List&lt;AllPostInformation&gt;)Session["CheckExistData"])
          {
              if ((List&lt;AllPostInformation&gt;)Session["AllNewsPostCollection"] != null)
              {
  
  
                  List&lt;AllPostInformation&gt; o = new List&lt;AllPostInformation&gt;();
                  o = (List&lt;AllPostInformation&gt;)Session["AllNewsPostCollection"];
                  rptNews.DataSource = o;
                  rptNews.DataBind();
              }
              Session["CheckExistData"] = Session["AllNewsPostCollection"];
          }
      }
  </code></pre>
  
  <p>and on asp page</p>
  
  <pre><code> &lt;asp:UpdatePanel runat="server" ID="upTimer"&gt;
          &lt;Triggers&gt;
              &lt;asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" /&gt;
          &lt;/Triggers&gt;
          &lt;ContentTemplate&gt;
              &lt;asp:Timer ID="Timer1" runat="server" Interval="5000" /&gt;
          &lt;/ContentTemplate&gt;
      &lt;/asp:UpdatePanel&gt;
  </code></pre>