首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

response.write"<a href,该怎么解决

2012-03-09 
response.writea href这是新闻主页new.asp,显示每条新闻标题的代码%response.write ahref window.a

response.write"<a href
这是新闻主页new.asp,显示每条新闻标题的代码
  <%  
response.write " <a   href= 'window.asp?id=id "&   rs( "id ")   &   " '   target= 'aa '> "& "     "&   rs   ( "title ")& " </a>   "
rs.movenext
loop
conn.close
set   rs=   nothing
set   conn=nothing
             
%>
下面是window.asp显示每条新闻详细内容的代码
  <%  
set   rs=server.createobject( "ADODB.Recordset ")  
sql= "select   content   from   news   where   id= "&Request.QueryString( "id ")
rs.open   sql,conn,1,1
do   while   not   rs.eof
%>
浏览器提示:Microsoft   JET   Database   Engine   (0x80040E14)
语法错误   (操作符丢失)   在查询表达式   'id= '   中。
/bondrise/window.asp,   第   15   行,
  搞了一下午了。。。。求高手帮忙啊


[解决办法]
因为id很可能是undefined类型,
再者,强制转换类型是可以去掉空格的,哈哈。。。美女!

热点排行