Template Default.asp
' Here is the sample program shown on the homepage of this site: http://asp.on.net.cn/
' Apply with all of the home page display program.
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title>asp Dynamic Online http://asp.on.net.cn</title>
<link rel= "stylesheet" type= "Text/css" href= "Css/style.css" >
<body bgcolor= "#FFFFFF" >
<div align= "center" >
<p> Homepage Template! Latest 5 News! </p>
<table width= "60%" cellpadding= "0" cellspacing= "0" align= "center" >
<tr>
<TD width= "60%" valign= "Top" height= "Si" >
<table width= "100%" border= "1" cellspacing= "0" cellpadding= "0" align= "center" bordercolorlight= "#000000" bordercolordark= "#FFFFFF" >
<tr>
<TD height= "5" >
<table width= "100%" border= "0" cellspacing= "0" cellpadding= "0" >
<tr>
<TD colspan= "2" height= "8" ><%
Dim conn
Dim connstr
On Error Resume Next
Connstr= "dbq=" +server.mappath ("/new/new.mdb") + ";D efaultdir=;D river={microsoft Access DRIVER (*.mdb)};"
Set Conn=server.createobject ("ADODB. CONNECTION ")
Conn.Open ConnStr
Dim sql
Dim rs
Sql= "SELECT Top 5 * Learning ORDER BY ArticleID Desc"
Set rs= conn.execute (SQL)
If rs.eof and Rs.bof then
Response.Write "<p align= ' center ' > hasn't had any articles </p>"
Else
%><%do While not rs.eof%><font color= "#000099" >0</font> <a href= "<%=rs (" url ")%>" target = "_blank" ><%=rs ("title")%></a>
<i><font color= "#FF0000" > (<%=rs ("DateAndTime")%>) </font></i><br>
<%=rs ("content")%><br>
<%
Rs.movenext
Loop
Rs.close
End If
Set rs=nothing
Conn.close
Set conn=nothing
%> </td>
</tr>
<tr>
<TD colspan= "2" >
<div align= "right" ><a href= "new/index.asp" > Prior announcements >></a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div align= "center" > </div>
</td>
</tr>
</table>
</div>
</body>
Author: o Source: <asp Dynamic Online > http://asp.on.net.cn/
adjourned