首页 > 开发 > 综合 > 正文

datalist分页(页面部分)

2024-07-21 02:16:48
字体:
来源:转载
供稿:网友
<body ms_positioning="gridlayout" topmargin="5" leftmargin="1" rightmargin="5">
        <table width="100%">
            <tr>
                <td>
                    <cj168:header id="header1" runat="server" />
                </td>
            </tr>
        </table>
        <form id="search" method="post" runat="server">
            <table border="0" cellspacing="0" cellspacing="0" width="98%" align="center">
                <tbody>
                    <tr>
                        <td class="pagetop">
                            <span style="float:left">已搜索有关
                                <asp:label id="lbltxtsearch" font-bold="true" runat="server"></asp:label>
                                的文章</span><span style="float:right">共有<asp:label id="lblrecordcount" font-bold="true" runat="server" />项结果, 这是第<asp:label id="lblpagerange" font-bold="true" runat="server" />项。
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td height="20">
                             
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:datalist id="datalistsearchresult" runat="server" horizontalalign="left" width="100%">
                                <itemtemplate>
                                    <table border="0" width="100%" align="left">
                                        <tr>
                                            <td>
                                                <asp:hyperlink id="hyperlink2" text='<%# databinder.eval(container.dataitem, "mainheader").tostring().trim()%>' navigateurl='<%# "showissuecat.aspx?magname=" + server.urlencode(databinder.eval(container.dataitem, "magname").tostring()) + "&magid=" + databinder.eval(container.dataitem, "magid") + "&magyear=" + databinder.eval(container.dataitem, "magyear") + "&yearissue=" + databinder.eval(container.dataitem, "yearissue") + "&artid=" + databinder.eval(container.dataitem, "txtid") %>' target="_blank" runat="server" cssclass="menuselected">
                                                </asp:hyperlink>
                                                <span class="maginfo">
                                                    <%# server.htmlencode(databinder.eval(container.dataitem, "magname").tostring()) %>
                                                    <%# databinder.eval(container.dataitem, "magyear") %>
                                                    年度 第<%# databinder.eval(container.dataitem, "yearissue") %>期</span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="content">
                                                <%# ((string)databinder.eval(container.dataitem, "content")).substring(0,100)%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="20">
                                                 
                                            </td>
                                        </tr>
                                    </table>
                                </itemtemplate>
                            </asp:datalist>
                        </td>
                    </tr>
                    <tr>
                        <td align="middle">
                            <br>
                            <asp:linkbutton id="lbnprevpage" text="上一页" commandname="prev" oncommand="page_onclick" runat="server" />
                            <asp:linkbutton id="lbnnextpage" text="下一页" commandname="next" oncommand="page_onclick" runat="server" />
                            当前为<asp:label id="lblcurrentpage" font-bold="true" runat="server" />/<asp:label id="lblpagecount" font-bold="true" runat="server" />页
                        </td>
                    </tr>
                </tbody>
            </table>
        </form>
        <table border="0" width="100%">
            <tr>
                <td>
                    <cj168:footer id="footer1" runat="server" />
                </td>
            </tr>
        </table>
    </body>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表