【 tulaoshi.com - ASP 】
                             
                               程序处理完毕后,重新导向delete.asp这个asp文件,用以刷新新闻数据库内的显
示,那么每提交一条新闻资料,我们马上可以看见执行的结果是否成功了。   
以下是delete.asp的文件内容。   
《% @language="vbscript" %》   
《%   
response.buffer=true   
Response.Expires=0     
%》   
《!--#include Virtual="/news/data/data.inc"--》   
《%     
Set rs = Server.CreateObject("ADODB.Recordset")   
sql="select * from data order by news_class ASC,news_id Desc"   
'rs.PageSize=100   
rs.open sql,conn,3,2       
%》   
《html》     
《head》   
《meta http-equiv="Content-Type" content="text/html; 
charset=gb2312"》   
《title》新闻数据库中所存的资料《/title》   
《meta name="GENERATOR" content="Microsoft FrontPage 3.0"》   
《style TYPE="text/css"》   
《!--   
lh22px {font-size:12px;line-height:22px;font-family:宋体}   
a { text-decoration: none}   
body {line-height:18px;font-size:9pt;font-family:宋体}   
td {line-height:18px;font-size:9pt;font-family:宋体}   
a:hover {color:#FF0000;text-decoration:none}   
--》   
《/style》   
《meta name="Microsoft Border" content="none"》   
《/head》     
《body》     
《form method="POST" action="delete.asp"》   
《table border="0" width="750" cellpadding="0"》   
《tr》   
《td width="750" bgcolor="#EBEBEB" colspan="2"》《div align="center"》
《center》《p》《font   
size="3"》《strong》新闻数据库中所存的资料《/strong》《/font》《/td》   
《/tr》   
《%   
do while not rs.eof   
%》   
《tr align="center"》   
《td width="112" bgcolor="#EBEBEB"》是否删除:《%if rs("news_delete")=-
1 then%》   
《input type="checkbox" name="《%=rs("news_id")%》"   
value="ON"》   
《%else%》   
《input type="checkbox" name="《%=rs("news_id")%》"   
value="OFF"》   
《%end if%》   
《/td》   
《td width="638" bgcolor="#FAFAFA" align="left"》《%if rs
("news_class")=1 then%》   
《font color=red》市场风云《/font》   
《%end if%》   
《%if rs("news_class")=2 then%》   
《font color=red》IT新闻《/font》   
《%end if%》   
《%if rs("news_class")=3 then%》   
《font color=red》广州市场《/font》   
《%end if%》   
《%if rs("news_class")=4 then%》   
《font color=red》保 留《/font》   
《%end if%》   
《%if rs("news_class")=5 then%》   
《font color=red》保 留《/font》   
《%end if%》   
《%=rs("news_title")%》《/td》   
《/tr》   
《%   
rs.movenext   
loop   
%》  &n