我看到了幾篇關於這個topc的文章。我注意到一個代碼。我也在下面的代碼url中使用了相同的代碼。 Binding asp.net datalist with jQuery用jQuery綁定asp.net datalist不起作用
function OnSuccess(response) {
$("[id*=dlOnFrontPageProducts]").attr("border", "1");
var xmlDoc = $.parseXML(response.d);
var xml = $(xmlDoc);
var customers = xml.find("Table1");
var row = $("[id*=dlOnFrontPageProducts] tr:last-child").clone(true);
$("[id*=dlOnFrontPageProducts] tr:last-child").remove();
$.each(customers, function() {
alert(this);
var customer = $(this);
$(".Name", row).html(customer.find("Name").text());
$(".BrandName", row).html(customer.find("BrandName").text());
$(".MarketPrice", row).html(customer.find("MarketPrice").text());
$(".CurrencyShortName", row).html(customer.find("CurrencyShortName").text());
$(".Price", row).html(customer.find("Price").text());
$(".WindowImageUrl", row).html(customer.find("WindowImageUrl").text());
$(".SaleCount", row).html(customer.find("SaleCount").text());
$(".IsActive", row).html(customer.find("IsActive").text());
$("[id*=dlOnFrontPageProducts]").append(row);
row = $("[id*=dlOnFrontPageProducts] tr:last-child").clone(true);
});
}
<asp:DataList ID="DataList1" runat="server" AutoGenerateColumns="false" Font-Names="Arial"
Font-Size="10pt" RowStyle-BackColor="#A1DCF2" HeaderStyle-BackColor="#3AC0F2" HeaderStyle-ForeColor = "White">
<ItemTemplate>
<asp:Label ID="lbldescription" runat="server" Text='<%# Eval("description")%>'>
</asp:Label>
<asp:Label ID="name" runat="server" Text='<%# Eval("name")%>'>
</asp:Label>
</ItemTemplate>
我如何結合使用AJAX和jQuery。我的頁面需要16秒來加載頁面。這是我要去jquery。
請幫我尋找解決方案....
感謝
有多少數據被綁定到下拉列表下面的代碼給出? – Nikshep
差不多500行。我想綁定到datalst。並且datalist格式正確... –
我正在使用datalst作爲 的'> '> ItemTemplate> –