$(function () { // Proxy created on the fly var job = $.connection.myHub; // Declare a function on the job hub so the server can invoke it job.client.displayStatus = function () { getData(); }; // Start the connection $.connection.hub.start(); getData(); }); function getData() { var $tbl = $('#tbl'); $.ajax({ url: 'default3.aspx/GetData', contentType: "application/json; charset=utf-8", dataType: "json", type: "POST", success: function (data) { debugger; if (data.d.length > 0) { var newdata = data.d; $tbl.empty(); $tbl.append(' <tr><th>ID</th><th>Kullanıcı Adı</th><th>Şifre</th><th>SilindiMi</th><th>İşlemler</th></tr>'); var rows = []; for (var i = 0; i < newdata.length; i++) { rows.push(' <tr>'); rows.push('<td>' + newdata[i].id + '</td>'); rows.push('<td>' + newdata[i].kullaniciAdi + '</td>'); rows.push('<td>' + newdata[i].sifre + '</td>'); rows.push('<td>' + newdata[i].silindiMi + '</td>'); rows.push(' </tr>'); } $tbl.append(rows.join('')); } } }); }
<div> <table id="tbl"></table> <br /> <hr /> <div id="divRpt"> <table> <asp:Repeater ID="rptTbl" runat="server"> <ItemTemplate> <tr> <td> <span class="id"><%# Eval("id") %></span> </td> <td> <span class="kullaniciadi"><%# Eval("kullaniciAdi") %></span> </td> <td> <span class="sifre"><%# Eval("sifre") %></span> </td> <td> <asp:LinkButton ID="lnkBton" CommandName="tiklaName" runat="server" Text="Tikla"></asp:LinkButton> </td> </tr> </ItemTemplate> </asp:Repeater> </table> </div> </div>
Quote:I'm pulling the data, but I can't print it Repeater.
Data Representation Control
Repeater
Server
Control
SignalR
Hub
HTML table
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)