关于ASP网页调取问题?

谁帮我看看下边的代码哪里错了,我的目的是网页标题调取新闻题目,我修改后标题是自动调取文章题目了,可是文章内容不显示了。(解决问题在加分30分)<!--#includefi... 谁帮我看看下边的代码哪里错了,我的目的是网页标题调取新闻题目,我修改后标题是自动调取文章题目了,可是文章内容不显示了。(解决问题在加分30分)
<!--#include file="inc/syscode.asp"-->
<%
dim id,nr,bt,hits
if request("articleid")<>"" then
articleid=request("articleid")
else
response.Redirect("index.asp")
end if
set rs=server.createobject("adodb.recordset")
sqltext="select * from product where articleid = "&articleid
rs.open sqltext,conn,1,3
if not rs.eof then
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=rs("title")%></title>
<link href="css.css" rel="stylesheet" type="text/css">
<!-- #include file="cd.asp" --></head>

<body>
<table width="940" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="67" class="ct"><table height="67" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="86%"> </td>
<td width="14%" class="top"><a href="index.asp">中文</a>   English</td>
</tr>
</table></td>
</tr>
<tr>
<td height="12"></td>
</tr>
<tr>
<td><table width="560" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="ct2" onMouseOver="this.className='ct3'" onMouseOut="this.className='ct2'"><a href="AboutUs.asp">关于畅拓</a></td>
<td class="ct3" >产品&系统</a></td>
<td class="ct4" onMouseOver="this.className='ct5'" onMouseOut="this.className='ct4'"><a href="index.asp"><a href="news.asp">新闻&新品发布</a></td>
<td class="ct2" onMouseOver="this.className='ct3'" onMouseOut="this.className='ct2'"><a href="xxfb.asp">信息反馈</a></td>
<td class="ct2" onMouseOver="this.className='ct3'" onMouseOut="this.className='ct2'"><a href="zxns.asp">招贤纳士</a></td>
<td class="ct2" onMouseOver="this.className='ct3'" onMouseOut="this.className='ct2'"><a href="lxwm.asp">联系我们</a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="20"> </td>
</tr>
</table>
<table width="940" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<!-- #include file="include/cp.asp" -->

<td width="40" valign="top"><div align="center"><img src="img/line.jpg" width="11" height="520" /></div></td>
<td valign="top" class="ct11"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" style="font-size:13px; color:#333; " height="40"><b><%=rs("title")%></b></td>
</tr>
<tr>
<td style="font-size:12px; color:#666666; letter-spacing:1.5px; line-height:150%; padding:10px 10px 10px;"><%=rs("content")%></td>
</tr>
<tr>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table><%
end if
rs.close
set rs=nothing
%>
<!-- #include file="include/footer.asp" -->
展开
 我来答
我是贝克
2010-09-29 · TA获得超过341个赞
知道小有建树答主
回答量:276
采纳率:77%
帮助的人:117万
展开全部
你的文章标题显示了,说明数据库打开没问题,数据至少成功到

<title><%=rs("title")%></title>

不知道你的cp.asp是什么网页,是不是有rs.close代码,试着把
<!-- #include file="include/cp.asp" -->删除试一下。

另外判断Eof就可以了
开封朱大宝
2010-09-30 · TA获得超过107个赞
知道答主
回答量:406
采纳率:0%
帮助的人:157万
展开全部
我觉得,最好直接定义两个变量,sTitle,sContent,

<%
dim id,nr,bt,hits
if request("articleid")<>"" then
articleid=request("articleid")
else
response.Redirect("index.asp")
end if
set rs=server.createobject("adodb.recordset")
sqltext="select * from product where articleid = "&articleid
rs.open sqltext,conn,1,3
if not rs.eof then
sTitle = rs("title")
sContent = rs("content")
rs.close
%>

在网页要显示数据的地方用 <%=sTitle%>,<%=sContent%>显示,你在下面引用的文件很可能把rs给关闭了,没看到其他的代码,不好说
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
力位长精神6
2010-09-29 · 超过26用户采纳过TA的回答
知道答主
回答量:82
采纳率:0%
帮助的人:26.8万
展开全部
懒得看了,随随便看下发现你居然只判断了Eof没有判断Bof!
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
阿星实战淹境菍br77d
2010-09-30 · 超过23用户采纳过TA的回答
知道答主
回答量:152
采纳率:0%
帮助的人:62.6万
展开全部
用ID 作为判断条件 最好
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式