Step 1- Create a new ASP.NET web application.
Step 2- Create a table.html.
Step 3- Add the bootstrap CSS and AngularJS files in CSS and JS folders respectively.
Step 4- Create an images folder and add images in the folder.


Step 5 -
Table.html source code can be copied from here.
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title></title>
  5. <link href="css/bootstrap.min.css" rel="stylesheet" />
  6. <script src="js/angular.js"></script>
  7. <script>
  8. var obj = angular.module("myApp", []);
  9. obj.controller("EmpController", function($scope) {
  10. //list of data
  11. $scope.array = [{
  12. eno: 1,
  13. ename: "Gururaj",
  14. esal: 17000,
  15. pic: 'guru.jpg'
  16. }, {
  17. eno: 2,
  18. ename: "Bhimashankar",
  19. esal: 30000,
  20. pic: 'bhima.jpg'
  21. }, {
  22. eno: 3,
  23. ename: "Rahul",
  24. esal: 26000,
  25. pic: 'rahul.jpg'
  26. }, {
  27. eno: 4,
  28. ename: "Vishawanath",
  29. esal: 16500,
  30. pic: 'vishwa.jpg'
  31. }, {
  32. eno: 5,
  33. ename: "Laxmikanth",
  34. esal: 15000,
  35. pic: 'laxmi.jpg'
  36. }, {
  37. eno: 6,
  38. ename: "Sachin",
  39. esal: 22000,
  40. pic: 'sachin.jpg'
  41. }, {
  42. eno: 7,
  43. ename: "Bhojaraj",
  44. esal: 15000,
  45. pic: 'bhoju.jpg'
  46. }];
  47. //onmouse over image should be large
  48. $scope.image = 'guru.jpg';
  49. $scope.name = "Gururaj";
  50. $scope.salary = "17000";
  51. $scope.update = function(arg, nme, sal) {
  52. $scope.image = arg;
  53. $scope.name = nme;
  54. $scope.salary = sal;
  55. }
  56. //sort the data through eno properties
  57. $scope.isReverse = false;
  58. $scope.enamesortType = 'ename';
  59. });
  60. </script>
  61. <style>
  62. /*based on even number row color should be change*/
  63. .red {
  64. color: red;
  65. background-color: #efedca;
  66. }
  67. </style>
  68. </head>
  69. <body ng-app="myApp">
  70. <div ng-controller="EmpController">
  71. <div class="container row col-md-12">
  72. <div class="col-md-4">
  73. <h3> Number of Employees : <span class="label label-warning">{{array.length}}</span> </h3>
  74. <h3>Sort by Names</h3> <input id="Text1" type="text" ng-model="Names" />
  75. <!--sortout based on salary -->
  76. <h3>Sort by Salary</h3> <select ng-model="Salary">
  77. <option value="">All</option>
  78. <option>15000</option>
  79. <option>25000</option>
  80. <option>30000</option>
  81. <option>16000</option>
  82. <option>20000</option>
  83. </select>
  84. <!--select number of rows to display-->
  85. <h3> Number of Rows</h3> <select ng-model="scount">
  86. <option>All</option>
  87. <option>2</option>
  88. <option>4</option>
  89. <option>6</option>
  90. <option>8</option>
  91. </select> </div>
  92. <div class="col-md-4">
  93. <table border="1" class="table table-bordered">
  94. <tr class="bg-success">
  95. <th><a href="#" ng-click="isReverse=!isReverse"> E.No</a></th>
  96. <th>Name</th>
  97. <th>Salary</th>
  98. <th>Picture</th>
  99. </tr>
  100. <tr ng-repeat="items in array |filter:Names |filter:Salary |limitTo:scount |orderBy:sortType:isReverse" ng-class-even="{red:true}">
  101. <td>{{items.eno}}</td>
  102. <td>{{items.ename}}</td>
  103. <td>{{items.esal|currency:"₹"}}</td>
  104. <td><img ng-src="img/{{items.pic}}" data-ng-mouseover="update(items.pic,items.ename,items.esal)" style="height:70px; width:70px;border-radius:50%" /></td>
  105. </tr>
  106. </table>
  107. </div>
  108. <div class="col-md-4">
  109. <!--onmouseover image shoule be large--><img ng-src="img/{{image}}" style="height:250px;width:220px;box-shadow:0px 0px 10px green;padding:10px;margin:20px" />
  110. <div class="alert alert-success"> <strong>Employee Name:</strong> {{name}} <strong>Salary:</strong>{{salary}} </div>
  111. </div>
  112. </div>
  113. </div>
  114. </body>
  115. </html>
Step 6 - Run the table.html file in your browser.