function OnSuccess(response) {
var xmlDoc = $.parseXML(response.d);
var xml = $(xmlDoc);
pageCount = parseInt(xml.find("PageCount").eq(0).find("PageCount").text());
var customers = xml.find("Customers");
var repeatColumns = parseInt("<%=dlproducts.RepeatColumns == 0 ? 1 : dlproducts.RepeatColumns %>");
var rowCount = Math.ceil(customers.length / repeatColumns);
var i = 0;
while (i < repeatColumns * rowCount) {
var row = $("[id*=dlproducts] tr").eq(0).clone(true);
for (var j = 0; j < repeatColumns; j++) {
var customer = $(customers[i]);
if (customer.length == 0) {
//alert('Bingo');
$("table:last", row).remove();
} else {
$(".name", row).eq(j).html(customer.find("Name").text());
$(".productId", row).eq(j).html(customer.find("ProductId").text());
$(".description", row).eq(j).html(customer.find("Description").text());
$(".imageUrl", row).eq(j).html(customer.find("ImageUrl").text());
$(".image", row).eq(j).attr("src", 'Images/' + customer.find("ImageUrl").text());
$(".price", row).eq(j).html(customer.find("Price").text());
$(".quantity", row).eq(j).html(customer.find("Quantity").text());
//$(".lbtnaddtocart", row).eq(j).text(customer.find("Name").text());
//this is where i m stuck,how to add contents to the linkbutton on scroll......
$(".lbtnaddtocart", row).eq(j).attr("CommandArgument", customer.find("ProductId").text());
}
i++;
}
$("[id*=dlproducts]").append(row);
}
//$("[id*=dlproducts] tr").eq(0).remove();
$("[id*=dlproducts]").show();
$("#loader").hide();
}
RepeatDirection="Horizontal" CellPadding="0" CellSpacing="0" BackColor="AliceBlue"
Width="100%">
<%# Eval("Name") %> |
Productid: font-weight: 500;"> <%# Eval("Productid") %> Description <%# Eval("Description") %> ImageUrl: <%# Eval("ImageUrl")%> Price: <%# Eval("Price")%> Quantity: <%# Eval("Quantity")%> BackColor="Green" Font-Bold="true" Text="Add To Cart" Width="150px" BorderColor="Black" BorderStyle="Inset" BorderWidth="2px" ToolTip="Add To Cart"> |

Replies
Know the answer? Post it — somebody with the same question will find it here.