title: Get id of dynamically generated button in Razor
body: <p>I've a table with a list of object and in every row I've dynamically generated button to delete the row. </p>
  
  <p>how to get in <code>@{ c#  }</code>  the id of the pressed button?</p>
  
  <pre><code>@for (int i = 0; i &lt; BL.SNG.GetListLen(); i++)
  {
      &lt;form method="post"
            action=""&gt;
          &lt;input type="submit"
                 value="Delete @i"
                 id="@i"
                 onclick="button_click(this.id)" /&gt;
      &lt;/form&gt;
      &lt;/td&gt;
  </code></pre>