关于asp问题,在线等======

来源:百度知道 编辑:UC知道 时间:2024/06/17 02:01:34
是一段查看文章的代码,list.asp

就是查看文章的时候 ID 写在以下代码的哪个地方???

本来查看文章的时候, 访问该篇文章地址栏是这样 http://网址/list.asp?id=1 才能查看到该ID为1文章

那如何把 ID=1 这个写在以下代码的哪个地方,可以直接用 http://网址/list.asp 这个地址查看ID为1的文章

因本人刚学的ASP,有些地方不懂,希望哪位高手能指教指教

<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="code.asp"-->
<%
dim sql
dim rs
dim title
set rs=server.createobject("adodb.recordset")
sql="update article set hits=hits+1 where articleID="&request("id")
rs.open sql,conn,1,3
sql="select article.title from article where article.articleID="&request("id")
rs.open sql,conn,1,1
if not rs.eof then
title=rs("title")
end if
rs.close
%>

<html>
<head>
<meta HTTP-EQUIV="Content-Type" content="t

把这一句<%idid=trim(Request.QueryString("id"))
strSql="Select * from Article where Article_id=" & idid
set rs=Conn.execute(strSql)%>写在<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="code.asp"-->后面或者是<body>下面也可以

idid=request("id")
改成
idid=1

把这一句<%idid=trim(Request.QueryString("id"))
strSql="Select * from Article where Article_id=" & idid
set rs=Conn.execute(strSql)%>写在<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="code.asp"-->