Forums - C# Corner

Forum guidelines
Gaurav Raj

Gaurav Raj

  • 1.3k
  • 158
  • 6.2k

hello friends this is my code but it not working please help

Sep 29 2017 4:02 AM
function GetRecords() {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "http://localhost:11722/WebServiceSocialNet.asmx/getHome",
data: '{s: "' + 5+ '"}',
dataType: "json",
success: function (data) {
alert('success');
//Iterate through returned data and append it to the grid view
for (var i = 0; i < data.d.length; i++) {

var row = $("#DataList1 .name").eq(0).clone(true);
row = $("#DataList1 .blogPic").html(data.d[i].BlogPic);
row = $("#DataList1 .Blog").html(data.d[i].Blog);
row = $("#DataList1 .Date1").html(data.d[i].date);
row = $("#DataList1 .Time1").html(data.d[i].time);
row = $("#DataList1 .Blogby").html(data.d[i].blogbyname);
row = $("#DataList1 .UserPic").html(data.d[i].userpic);
row = $("#DataList1 .LIKED").html(data.d[i].liked);
row = $("#DataList1 .TotalComment").html(data.d[i].totallike);
row = $("#DataList1 .TotalLike").html(data.d[i].totalcomment);
$("[id*=DataList1]").append(row);
//alert(row);


}
},

Answers (4)