asp.net listview datapager和jquery

时间:2011-10-04 05:25:41

标签: c# jquery asp.net ajax listview

我有一个通过ajax调用调用的Asp.net Listview控件。 Listview控件每个视图只有10个项目。当我翻阅时,我当然会收到错误,因为它没有那些数据。有没有办法从ajax调用获取listview,仍然能够翻阅项目列表。谢谢!

   <asp:ListView runat="server" ID="lvFullControl" GroupItemCount="5" OnItemCreated="Setup">
            <EmptyDataTemplate>
                <table id="Table1" runat="server" style="">
                    <tr>
                        <td>
                            No data was returned.
                        </td>
                    </tr>
                </table>
            </EmptyDataTemplate>
            <EmptyItemTemplate>
                <td id="Td1" runat="server" />
            </EmptyItemTemplate>
            <GroupTemplate>
                <tr id="itemPlaceholderContainer" runat="server">
                    <td id="itemPlaceholder" runat="server">
                    </td>
                </tr>
            </GroupTemplate>
            <ItemTemplate>
                <td id="Td2" runat="server" style="display: inline-block; position: relative; margin: 0.7em;
                    text-align: left; vertical-align: top;">
                    <div id="HypeShare" style="padding: 0; margin: 0">
                        <input type="hidden" value="<%#Eval("ID") %>" />
                        <asp:HyperLink runat="server" ID="hypShar"></asp:HyperLink>
                         <input type="hidden" value="<%#Eval("CreatD") %>"/>
                         </div>
                    <div class="EditClass">
                        <asp:ImageButton ToolTip='<%#Eval("Description") %>' runat="server" ID="AlbumImage" Width="110"
                            Height="110" ImageUrl='<%#Eval("Defau") %>' /></div>
                    <img src="../SiteImages/private.png" style="margin: 0" />
                    <span style="margin: 0">photos:
                        <%#Eval("Count")%></span><br />
                    <div id="hypAccess" style="padding: 0; margin: 0">
                        <input type="hidden" value="<%#Eval("ID") %>" />
                        <asp:HyperLink runat="server" ID="hypeDelet" Visible="false" Text="Delete"></asp:HyperLink>
                        <asp:HyperLink ID="hypeMyAccess" runat="server" Visible="false" Text="Remove my Access"></asp:HyperLink>

                    </div>
                    <div  class="EditClass">
                        <asp:HyperLink runat="server" ID="Edit" ToolTip='<%#Eval("Description") %>' Font-Underline="false">
                        <p class="title" runat="server" id="pTitle">
                            <%#Eval("Name") %></p>
                    </asp:HyperLink></div>
                </td>
            </ItemTemplate>
            <LayoutTemplate>
                <table id="Table2" runat="server">
                    <tr id="Tr1" runat="server">
                        <td id="Td3" runat="server">
                            <table id="groupPlaceholderContainer" runat="server" border="0" style="">
                                <tr id="groupPlaceholder" runat="server">
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr id="Tr2" runat="server">
                        <td id="Td4" runat="server" style="">
                        </td>
                    </tr>
                </table>
            </LayoutTemplate>
        </asp:ListView>
        <asp:DataPager ID="ProductListPagerSimple" runat="server"

PagedControlID =“lvFull”PageSize =“10”&gt;                            

 function GetFullA() {
            $.ajax({
                type: "GET",
                url: '../Controls/myfullcontrol.aspx',
                cache: false,
                success: function (data) {
                    $('#SiteFullControl').html(data);
                },
                complete: function () {
                    $('#FullControlCount').html('Full Control  (' + $('[id$=FullCounter]').val() + ')');
                    setupAccessInfo();
                    setupShareAccess();
                    menuFullControlSetup($('#nav-myfullcontrol'));
                        $('#LoadingAjax').dialog('close');
                        destroyDialog = false;
                }

            });
        }

0 个答案:

没有答案