title: ASP.Net repeater Item Command not getting fired
body: <p>OK, I've used repeaters literally hundreds of times without problems but something has gone awry today.  I have a repeater and I'm subscribing to the itemCommand event, but when my command runs, the page posts back but the event isn't fired.</p>
  
  <p>To get around this I'm having to do my databinding on each postback.</p>
  
  <p>My repeater looks like this:</p>
  
  <pre><code>&lt;asp:Repeater id="MyRepeater" runat="server" onitemcommand="MyRepeater_ItemCommand"&gt;
  &lt;ItemTemplate&gt;
      &lt;li&gt;
      &lt;asp:Label id="Label" runat="server" /&gt;
      &lt;asp:LinkButton id="LinkButton1" runat="server" commandname="Complete" commandargument='&lt;%# Eval("MyID") %&gt;' text='&lt;%# Eval("Title") %&gt;' /&gt;
      &lt;/li&gt;
  &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>and my codebehind like this:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      if (!IsPostBack)
      {
      SetupPage();
      }
  }
  
  private void SetupPage()
  {
      // Do other stuff
  
      MyRepeater.DataSource = Repository.GetStuff()
      MyRepeater.DataBind();
  }
  
  
  protected void MyRepeater_ItemCommand(object sender, RepeaterCommandEventArgs e)
  {
  
  
  // Do all my stuff here
  }
  </code></pre>
  
  <p>MyRepeater_ItemCommand is not getting called unless I comment out the if (!IsPostBack) line.  Once that is commented out and the repeater is getting databound on each postback it works OK.  I've done this in so many other pages but on this on it just doesn't seem to work.</p>
  
  <p>Anyone else come across this behaviour or have a solution?</p>