datalist分页(页面部分)
发表于:2007-06-30来源:作者:点击数:
标签:
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%
<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>
原文转自:http://www.ltesting.net