title: Prevent DataList to Refesh for ClickEvents
body: <p>I have a <code>DataList</code> Control with <code>HeaderTemplate</code> as <code>LinkButton</code>s.</p>
  
  <p><strong>The markup is</strong></p>
  
  <pre><code> &lt;asp:DataList runat="server" ID="dlYears"  OnItemDataBound="dlYears_ItemDataBound"&gt;
      &lt;HeaderTemplate&gt;
          &lt;asp:LinkButton ID="lblYear1" runat="server" OnClick="Year_Click"&gt;&lt;/asp:LinkButton&gt;
          &lt;asp:LinkButton ID="lblYear2" runat="server" OnClick="Year_Click"&gt;&lt;/asp:LinkButton&gt;
      &lt;/HeaderTemplate&gt;
      &lt;ItemTemplate&gt;
         &lt;asp:Label ID="lblValue" runat="server"Text='&lt;%# String.Format("{0:f2}",DataBinder.Eval(((IDataItemContainer)Container).DataItem, "Value")) %&gt;'&gt;&lt;/asp:Label&gt;
       &lt;/ItemTemplate&gt;
    &lt;/asp:DataList&gt;
  </code></pre>
  
  <p>Actually this datalist contains year numbers as <code>Headers</code> as <code>2016, 2015</code>.</p>
  
  <p><strong>Binding as</strong></p>
  
  <pre><code> dlYearlys.DataSource = ds;
   dlYearlys.DataBind();
  </code></pre>
  
  <p>On the <code>ItemDataBound</code> I'm styling the values of totals as</p>
  
  <pre><code>protected void dlYearlyTotals_ItemDataBound(object sender, DataListItemEventArgs e)
      {
          if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
          {
                 int i = e.Item.ItemIndex;
  
              if (val != ((Label)e.Item.FindControl("lblValue")).Text)
                  e.Item.ForeColor = System.Drawing.Color.Red;
          }
      }
  </code></pre>
  
  <p>On clicking the headers I'm displaying the another datalist values.</p>
  
  <pre><code>        protected void Year_Click(object sender, EventArgs e)
          {
              LinkButton btn = sender as LinkButton;
              BindAnotherDataList((Convert.ToInt16(btn.Text)));
          }
  </code></pre>
  
  <p>This causing the page to refresh and the year values where I'm changing the colour as <code>red</code> is no more being displayed.</p>
  
  <p>So how can I make dlYears <code>Datalist</code> control not to refresh and retain their colour on clicking of headers</p>
  
  <p><strong>Page Load</strong></p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
    { 
        if (!IsPostBack)
        {
            BinddlYear();
            // Binding Some other controls
        }
    }
  </code></pre>