このtopcに関するいくつかの投稿を見ました。1つのコードに気づきました。私はまた、以下のコードURLで同じコードに取り組みました。 asp.netデータリストをjQueryでバインドする
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秒かかります。それはyiがjqueryに行くことです。
解決策を見つけるために私を助けてください....
ありがとう