title: using a button inside a bootstrap table
body: <p>I'm trying to use a button to call the "Edit" action method from a controller named "Students", the following is my code:</p>
  
  <pre><code>&lt;script&gt;
  $("#table1").bootstrapTable({
  
      columns: [
          { field: 'fn', title: "First Name" }, { field: 'ln', title: "Last Name" }, { field: 'gender', title: "Gender" },
          { field: 'totalmarks', title: "Total Marks" }, { field: "totalcourses", title: "Total Courses Enrolled In" },
          {field: 'links', title: "Actions"}
          ],
      data: [
          @foreach (var item in Model)
          {
              int total = ((StudentsController)this.ViewContext.Controller).totc(@item.Id);
              @: { fn: '@item.FirstName', ln: '@item.LastName', gender: '@item.Gender', totalmarks: '@item.TotalMarks', totalcourses: '@total', 
              @: links: '&lt;input type="button" value="Edit" onclick="window.location.href='@Url.Action("Edit","Students")';" /&gt;' }
          ]
  });
  </code></pre>
  
  <p></p>
  
  <p>obviously it doesn't work, I tried using Html.ActionLink method and it worked but I need a button not a link.
  I'm still new at using bootstrap table, can someone help? </p>
  
  <p><strong>Update:</strong> forgot to say that the Edit method expects a number to be passed to it, and this number is the item.Id from the foreach loop.</p>