我做了一个新闻列表页,如何实现分页静态化?
页面:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewsList.aspx.cs" Inherits="NewsList" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div id="ShowContent1" class="showconten">
<ul>
<asp:Repeater runat="server" ID="DiyList">
<ItemTemplate>
<li><a href="<%# Convert.ToDateTime(Eval("CreateTime")).Year %>/<%# Convert.ToDateTime(Eval("CreateTime")).Month %>/<%# Convert.ToDateTime(Eval("CreateTime")).Day %>/<%# Eval("NewsID").ToString().Trim() %>.html"><%#Eval("Title")%> </a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div>
<div id="ShowPageList3">
<p><asp:Label ID="Label2" runat="server" Style="position: relative" Width="109px"></asp:Label><asp:HyperLink
ID="HyperLink3" runat="server" ForeColor="Blue" Style="left: 20px; position: relative"
Width="46px">首页</asp:HyperLink>
<asp:HyperLink ID="HyperLink1" runat="server" ForeColor="Blue" Style="left: 14px;
position: relative" Width="46px">上一页</asp:HyperLink>
<asp:HyperLink ID="HyperLink2" runat="server" ForeColor="Blue" Style="left: 7px;
position: relative" Width="46px">下一页</asp:HyperLink><font face="下一页"> </font><asp:HyperLink
ID="HyperLink4" runat="server" ForeColor="Blue" Style="position: relative" Width="46px">末页</asp:HyperLink><font
face="跳转到"></font>跳转到 <asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True"
OnSelectedIndexChanged="DropDownList3_SelectedIndexChanged">
</asp:DropDownList></p></div>
<div class="Clear"></div>
<div class="BL"></div><div class="BR"></div>
</form>
</body>
</html>
页面类:如何写?
ajax
要静态化就要告别现在这种方式,这种方式无法静态化,和做梦一样