title: C# how to remove a current row from the table by button click
body: <p>I am trying to remove a table row from the table:</p>
  
  <pre><code>&lt;tbody&gt;
      @foreach (var task in Model)
      {
          &lt;tr&gt;
  
                  &lt;td&gt;
                      @task.time
                  &lt;/td&gt;
                  &lt;td&gt;
                      @task.descripiton
                  &lt;/td&gt;
                  &lt;td&gt;
                      @task.duedo
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;form action="@Url.Action("Remove")" method="POST"&gt;&lt;input type="submit" value="Delete" /&gt;&lt;/form&gt;
                  &lt;/td&gt;
          &lt;/tr&gt;
  
      }
  &lt;/tbody&gt;
  </code></pre>
  
  <p>How could I send the index of the row to the controller?</p>
  
  <pre><code>public ActionResult Remove()
  {
     Task.RemoveAt();
     return RedirectToAction("Index");
  }
  </code></pre>
  
  <p>The row where I pressed the button would get removed.</p>