title: ASP.NET repeater control: how to pass parameter from frontend to repeater ItemCommand event
body: <p>I need to pass parameter from frontend to backend using repeater control
  My frontend code:</p>
  
  <pre><code>&lt;asp:Repeater ID="Repeater1" runat="server" 
              onitemdatabound="Repeater1_ItemDataBound" 
              onitemcommand="Repeater1_ItemCommand"&gt;
  ....
  &lt;asp:Button ID="btn_Reply" runat="server" Text="Reply" CommandName="Reply" CommandArgument='&lt;%Eval("id").ToString() %&gt;'/&gt;
  ....
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>Repeater1_ItemCommand event at backend:</p>
  
  <pre><code>protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
  {
      switch (e.CommandName)
      {
          case "Reply":
              ReplyThread(Convert.ToInt32(e.CommandArgument));
              break;
          case "Edit":
              EditThread(Convert.ToInt32(e.CommandArgument));
              break;
          case "Delete":
              DeleteThread(Convert.ToInt32(e.CommandArgument));
              break;
      }
  }
  </code></pre>
  
  <p>When click reply button, Why it says e.CommandArgument is not in a correct format., the value in debug model is just a bunch of string: &lt;%Eval("id").ToString() %>, not it's id value.</p>
  
  <p>Any idea?</p>