Ramco Ramco

Ramco Ramco

  • 440
  • 3.4k
  • 529.3k

How to show data in DataTable

May 27 2021 4:32 PM
Hi
 
  I want to display the below code in Jquery/BootStrap datatable
 
@model IEnumerable<MyApplication.Models.Location>
@*@{
Layout = null;
}*@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
</head>
<body>
<p>
</p>
<table class="table" id="tblLocation">
<tr>
<th>
@Html.DisplayNameFor(model => model.Description)
</th>
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>
</td>
</tr>
}
</table>
</body>
</html>
<script src="~/Scripts/Appjs/Location.js"></script>
 
 
Thanks 

Answers (1)