立即给分,非常简单,在线等待

kellybs 2003-10-21 01:41:17
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>
...全文
29 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
pgj 2003-10-21
  • 打赏
  • 举报
回复
搂主可以看一点asp.net方面的书,很快就可以改成asp.net的
windofcity 2003-10-21
  • 打赏
  • 举报
回复
同意楼上
larrybest 2003-10-21
  • 打赏
  • 举报
回复
这么简单,花半个小时就搞定了!!!楼主静点心!!
adminlxj79 2003-10-21
  • 打赏
  • 举报
回复
UP,我们的CSDN是技术讨论、交流的,而是专做项目的!!
kandyasp 2003-10-21
  • 打赏
  • 举报
回复
很好做,但不要指望别人给你做好,这个类似简单的新闻系统或留言簿系统

62,039

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧