I'm trying to use a button to call the "Edit" action method from a controller named "Students", the following is my code:

```
<script>
$("#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: '<input type="button" value="Edit" onclick="window.location.href='@Url.Action("Edit","Students")';" />' }
        ]
});

```

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? 

**Update:** 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.