Skip to content

Instantly share code, notes, and snippets.

@cynx
Created August 17, 2015 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cynx/2d8cc057d1cb5111fab6 to your computer and use it in GitHub Desktop.
Save cynx/2d8cc057d1cb5111fab6 to your computer and use it in GitHub Desktop.
index.cshtml of JQUERY DATATABLES 1.10+ & ASP.NET MVC 5 SERVER SIDE INTEGRATION
@{
ViewBag.Title = "Home Page";
}
@model IEnumerable<MVCDatatableApp.Models.Customer>
<!doctype html>
<html>
<head>
<title>@ViewBag.Title - MVC Datatables App</title>
</head>
<body>
<div class="container">
<h3>Customer Report</h3>
<div class="span12">
<table class="table table-striped" id="datatab">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.City)
</th>
<th>
@Html.DisplayNameFor(model => model.Postal)
</th>
<th>
@Html.DisplayNameFor(model => model.Email)
</th>
<th>
@Html.DisplayNameFor(model => model.Company)
</th>
<th>
@Html.DisplayNameFor(model => model.Account)
</th>
<th>
@Html.DisplayNameFor(model => model.CreditCard)
</th>
</tr>
</thead>
<tbody></tbody>
<tfoot>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.City)
</th>
<th>
@Html.DisplayNameFor(model => model.Postal)
</th>
<th>
@Html.DisplayNameFor(model => model.Email)
</th>
<th>
@Html.DisplayNameFor(model => model.Company)
</th>
<th>
@Html.DisplayNameFor(model => model.Account)
</th>
<th>
@Html.DisplayNameFor(model => model.CreditCard)
</th>
</tr>
</tfoot>
</table>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment