日期:2014-05-17  浏览次数:20419 次

.net4.0 listview与task配合实现异步查询的功能
本帖最后由 bug810 于 2013-08-02 10:10:30 编辑
listview代码如下:

     <asp:ListView ID="ListView1" runat="server" ItemPlaceholderID="itemPlaceholder" 
            onpagepropertieschanging="ListView1_PagePropertiesChanging">
    <LayoutTemplate>
                    <table style="width:100%;" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF" id="tblCategories">
                    <thead><tr style="background:#E3E3E3; font-weight:bold; text-align:center; height:25px;">
                        <td>
                            货物追踪</td>
                    </tr>
                    </thead>
                    <tbody> 
                       <asp:PlaceHolder runat="server" ID="ItemPlaceHolder"></asp:PlaceHolder> 
                    </tbody>
                    </table> 
     </LayoutTemplate>
    <ItemTemplate>
                    <tr>
                        <td colspan="10">
                            <%# 这里显示查询结果 %>
                                </td>