Friday, 16 February 2018

Get Data from server MVC C# ajax application

$ajax({
    url: '/Student/Show/',
    dataType: "json",
    type: "GET",
    contentType: 'application/json; charset=utf-8',
    data: { id: $("#txtroll").val() },
    success: function (data) {
        var html="";
            $j.each(data, function (i, item) {

                html += "<tr><td>" + item.roll + "</td><td>" + item.Name + "</td><td>" + item.city + "</td></tr>";
                     

            })
            $("#div_table").append(html);
                  
              
    }


});

No comments:

Post a Comment