title: Pass Data to Controller from Table in View with C#/Razor MVC
body: <p>I have a main view with multiple partial views in my C# MVC. The initial partial view contains a list which is populated from a model in a table. I want to be able to click a row on the table, and then populate another partial view based on the ID.</p>
  
  <p>I have initially used: <code>&lt;tr type="submit" onclick = "location.href = '@(Url.Action("RowClicked", "Test", new { id = @Html.DisplayFor(modelItem =&gt; item.ID) }))'" &gt;</code> which did pass the ID to the server, but it took me to a new page.</p>
  
  <p>I am not sure if I need to use forms. I want to be able to click one of the rows to redraw another partial view based on the value of the ID in the row clicked without the whole page refreshing.</p>
  
  <p>How do you send data using Razor/C# to the server in general without calling a new page, and how do I do this from each row of a table?</p>
  
  <p>Thanks</p>