My Name Is Salman Masood , I am Computer Science &Amp; Maths Graduate from University of Karachi, Pakistan , Teaching Is My Passion and My Aim Is to Deliver All My Knowledge among Those Students Who Can'T Afford Tutors or Expensive Institute Fees. I Will Be Keep Sharing My All Knowledge and Information with You .... Remember Me in Your Prayers !
Sunday, 23 December 2018
Get Data Through Ajax || Ajax with asp.net mvc in hindi/urdu
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="~/Scripts/jquery-1.10.2.js"></script>
<div class="container">
<table class="table table-responsive table-striped">
<thead>
<tr>
<th>ID</th>
<th>NAME</th>
<th>EMAIL</th>
<th>ADDRESS</th>
</tr>
</thead>
<tbody id="ListData">
</tbody>
</table>
</div>
<script>
$(document).ready(function () {
GetData();
function GetData()
{
var html = '';
$.ajax({
type: 'GET',
url: '/Home/GetAllEmployee',
success: function (response)
{
$.each(response, function (key, item)
{
html += "<tr> <td>" + item.Id + " <td> <td>" + item.Name + " <td> <td>" + item.Email + " <td> <td>" + item.Address + " <td></tr>";
});
$("#ListData").append(html);
}
});
}
});
</script>
Subscribe to:
Post Comments (Atom)
Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC
Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...
-
Load event: pictureBox3.Image = Image .FromFile( @"C:\Users\salman\Documents\Visual Studio 2013\Projects\WindowsFormsApplication3\W...
No comments:
Post a Comment