title: Cannot Insert data from button press with razor
body: <p>I am currently displaying information from a table called Workout table but what I want to do is take the WorkoutId then from another table the userId and save them in a table called UserCompletedWorkouts.</p>
  
  <p>Here is what i already have:</p>
  
  <p>view </p>
  
  <pre><code>@model IEnumerable&lt;SportsCoach.Models.WorkoutModel&gt;
  @{
  ViewBag.Title = "Workout";
  ViewBag.PageName = "View workout";
  }
  &lt;section id="MainContent" class="container"&gt;
  &lt;h2&gt;Workouts&lt;/h2&gt;
  &lt;p&gt;This page can be used to add, edit, view and delete workouts. &lt;/p&gt;
  
  
  &lt;table class="table table-striped"&gt;
      &lt;tr&gt;
          &lt;th&gt;Day&lt;/th&gt;
          &lt;th&gt;
              @Html.DisplayNameFor(model =&gt; model.WorkoutDetails)
  
          &lt;/th&gt;
      &lt;/tr&gt;
  
      @foreach (var item in Model)
      {
  
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;b&gt;@Html.Raw(item.Day)&lt;/b&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  @Html.Raw(item.WorkoutDetails).Replace("\n", "&lt;br /&gt;")&lt;br /&gt;
                  @Html.ActionLink("Confirm workout", "Create", null, new { @class = "btn btn-primary col-xs-12 col-sm-3 col-lg-3" })
              &lt;/td&gt;
          &lt;/tr&gt;
      }
  
  &lt;/table&gt;
  </code></pre>
  
  <p></p>