title: How do I get specific values from checked rows in MVC razor view?
body: <p>Ok, so I have this partial view (part of an MVC application) which just displays data from a view in the database.</p>
  
  <pre><code>@model IEnumerable&lt;TransportPlanner.Models.TRANSPORT_PLANNER_VIEW&gt;
  &lt;table&gt;
      &lt;tr&gt;
         &lt;th&gt;@Html.CheckBox("HeaderCheck")&lt;/th&gt;
          &lt;th&gt;@Html.DisplayNameFor(model =&gt; model.Status)&lt;/th&gt;
          ....
          &lt;th&gt;@Html.DisplayNameFor(model =&gt; model.Volume)&lt;/th&gt;
          &lt;th&gt;@Html.DisplayNameFor(model =&gt; model.Weight)&lt;/th&gt;
          ....
      &lt;/tr&gt;
      @foreach (var item in Model) {
          &lt;tr&gt;
              &lt;th&gt;@Html.CheckBox("RowCheck")&lt;/th&gt;
              &lt;td&gt;@Html.DisplayFor(modelItem =&gt; item.Status)&lt;/td&gt;
              ....
              &lt;td&gt;@Html.DisplayFor(modelItem =&gt; item.Volume)&lt;/td&gt;
              &lt;td&gt;@Html.DisplayFor(modelItem =&gt; item.Weight)&lt;/td&gt;
              ....
          &lt;/tr&gt;
      }
  &lt;/table&gt;
  </code></pre>
  
  <p>I want to be able to find a way in which I can get the values for the <code>Volume</code> and <code>Weight</code> fields of only the checked rows (after checking them), and add them to get the total (which is displayed but not stored). </p>
  
  <p>For example, once I get the results displayed on screen, and I check 3 rows (having the values of 'weight' as 5, 10 and 15), then value displayed should be '30' (sum of the weights). Similarly, if I remove the checkbox for the row having weight as '5', then the value displayed should be '25'.</p>
  
  <p>My front end skills are almost non-existent, and I have scourged over the internet for nearly 12 hours but not found a way to do it. I know that I need to either use JavaScript (or some flavour of it like JQuery) or Ajax (if I need the values updates dynamically as I check/uncheck them).</p>
  
  <p>What is the best way to achieve this, without updating my model? I don't have the luxury of time because I am the only developer at my workplace, and this is the first step of a huge task I need to complete in 3 weeks. </p>