这是我的在线投票的前台显示页面,数据库里有投票内容,为什么运行这个页面,什么也出不来呢,而且也没有错误提示:
<!--#include file="admin/conn.inc"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>在线调查</title>
<%
'=================================================
'过程名:ShowVote
'作 用:显示网站调查
'参 数:无
'=================================================
sub ShowVote()
dim sqlVote,rsVote,i
sqlVote="select top 1 * from Vote where IsSelected=True"
Set rsVote= Server.CreateObject("ADODB.Recordset")
rsVote.open sqlVote,conn,1,1
if rsVote.bof and rsVote.eof then
response.Write " 没有任何调查"
else
response.write "<form name='VoteForm' method='post' action='vote.asp' target='_blank'><td>"
response.write " " & rsVote("Title") & "<br>"
if rsVote("VoteType")="Single" then
for i=1 to 8
if trim(rsVote("Select" & i) & "")="" then exit for
response.Write "<input type='radio' name='VoteOption' value='" & i & "'>" & rsVote("Select" & i) & "<br>"
next
else
for i=1 to 8
if trim(rsVote("Select" & i) & "")="" then exit for
response.Write "<input type='checkbox' name='VoteOption' value='" & i & "'>" & rsVote("Select" & i) & "<br>"
next
end if
response.write "<br><input name='VoteType' type='hidden'value='" & rsVote("VoteType") & "'>"
response.write "<input name='Action' type='hidden' value='Vote'>"
response.write "<input name='ID' type='hidden' value='" & rsVote("ID") & "'>"
response.write "<div align='center'>"
response.write "<a href='javascript:VoteForm.submit();'><img src='images/voteSubmit.gif' width='52' height='18' border='0'></a> "
response.write "<a href='Vote.asp?Action=Show' target='_blank'><img src='images/voteView.gif' width='52' height='18' border='0'></a>"
response.write "</div></td></form>"
end if
rsVote.close
set rsVote=nothing
end sub
%>
</head>
<body>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><TD>
<% call ShowVote() %>
</TD>
</tr>
</table>
</body>
</html>