立即给分,非常简单,在线等待
http://www.changsanjiao.org/News/show.asp?types=招商引资
这个页面用asp.net怎么做
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<% types=trim(request("types"))
if types="" then
response.write "<br><br><span class=bt><font color=ff0000><b>参数出错!请确认是否从有效的网址进入。</b></font></span>"
else
%>
<!--#include virtual="/conn.asp"-->
<%
sql="select c.id,c.subject,c.addtime,m.newsid from changnews c,changtypes m where c.newsid=m.newsid and m.newstype='"&types&"' Order By c.addtime Desc"
Set rs=Server.CreateObject("adodb.recordset")
rs.open sql, conn, 1,1
rs.pagesize=20
Page = CLng(Request("Page"))
If Page < 1 Then Page = 1
If Page > rs.PageCount Then Page = rs.PageCount
if rs.eof or rs.bof then
response.write "<br><br><font color=ff0000><b>没有找到与<span class=bt>"&types&"</span>相关的记录</b></font>"
else
%>
<% show rs,page %>
<% sub show(rs,page)
rs.AbsolutePage =page
count=rs.pagesize %>
<table border="0" cellpadding="0" cellspacing="0" width="560">
<%
while not rs.eof and count>0
if len(trim(rs("subject")))<32 then
str=rs("subject")
else
str=left(rs("subject"),32)&"..."
end if
%>
<tr>
<td height="25"> <img src="../images/point.gif" width="4" height="5"> <a href="ShowNews.asp?id=<%=rs("id")%>&types=<%=types%>" title="<%=rs("subject")%>" target=_blank><%=Str%></a> <font color="b6b6b6">(<%=datevalue(rs("addtime"))%>)</font></td>
</tr>
<%
count=count-1 rs.movenext wend
%>
</table>
<% end sub %>
<form action="Show.asp?types=<%=types%>" method="post" name="f1">
<table width="560" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="41%" height="22"></td>
<td width="59%" height="22">
<% If Page <> 1 Then %>
<a href="Show.asp?Page=1&types=<%=types%>">首页</A>
<A HREF="Show.asp?Page=<%=(Page-1)%>&types=<%=types%>">上页</A>
<% End If
If Page <> rs.PageCount Then %> <A HREF="Show.asp?Page=<%=(Page+1)%>&types=<%=types%>">下页</A>
<A HREF="Show.asp?Page=<%=rs.PageCount%>&types=<%=types%>">末页</A>
<% End if %>
页次:<font COLOR="Red"><%=Page%>/<%=rs.PageCount%></font> <input type=text size=3 maxlength=5 name=page>
</td>
</tr>
</table>
</form>
<%
end if
rs.close
set rs=Nothing
conn.close
set conn=NOthing
End if %>
</td>
<td width="170" valign="top" bgcolor="#004684</td>
</tr>
</table></body>
</html>