ASP代码格式问题

笑开 2008-04-02 07:17:26
ASP页面出现问题
缺少 'End'
/bbs2/weekAuditingModify.asp, 第 149 行


修改了之后,还有别的问题,我对这个格式很是郁闷,大家帮我看看,让我顺利能通过编译。谢谢了~

<tr>
<%
set memgroup=conn.execute("select * from blog_member where mem_ID="& memid)
memname=memgroup("mem_name")
memgroup.close()
set memgroup=nothing
%>

<%
mysql="select taskid,logid,state,realtime,plantime,projectid,projectnm,taskdes ,completerate from projecttasks p,phase h,projects r where p.projectid=r.id and p.phaseid=h.phaseid and logid=" & logid &" and memberid=" & memid &" order by memberid"
set mytasks=conn.execute(mysql)
if not mytasks.eof and not mytasks.bof then
do while not mytasks.eof

%>



<td width="10%" bgcolor="#FFFFFF"><div align="center"><%=memname%></div></td>
<td width="15%" bgcolor="#FFFFFF"><div align="left">
<select name="<%="projectnm"%>" id="<%="projectnm"%>">
<%
set alltype=conn.execute("select id,projectnm,leader from projects group by leader,projectnm,id order by leader desc")
if not alltype.eof and not alltype.bof then
do while not alltype.eof



if alltype("id")=mytasks("projectid") then
%>
<option value="<%=alltype("id")%>" selected><%=alltype("projectnm")%></option>
<%
else

%>
<option value="<%=alltype("id")%>"><%=alltype("projectnm")%></option>
<%



end if
alltype.movenext
loop
alltype.close
set alltype = nothing
%>


</select></div></td>

<td width="35%" bgcolor="#FFFFFF"><div align="left"><%=mytasks("taskdes")%></div></td>
<td width="5" bgcolor="#FFFFFF"><div align="center">
<input type="button" name="btnAuditing" value="修改" onClick="OnModify('<%=logid%>','<%=memid%>','<%=auditingweek%>','<%=mytasks("taskid")%>')">
</div></td>



</tr>


<%

mytasks.movenext
loop
mytasks.close
set mytasks=nothing

%>
...全文
63 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
笑开 2008-04-03
谢谢大家了!
回复
hookee 2008-04-02
<tr>
<%
set memgroup=conn.execute("select * from blog_member where mem_ID="& memid)
memname=memgroup("mem_name")
memgroup.close()
set memgroup=nothing
%>

<%
mysql="select taskid,logid,state,realtime,plantime,projectid,projectnm,taskdes ,completerate from projecttasks p,phase h,projects r where p.projectid=r.id and p.phaseid=h.phaseid and logid=" & logid &" and memberid=" & memid &" order by memberid"
set mytasks=conn.execute(mysql)
do while not mytasks.eof
%>
<td width="10%" bgcolor="#FFFFFF"> <div align="center"> <%=memname%> </div> </td>
<td width="15%" bgcolor="#FFFFFF"> <div align="left">
<select name=" <%="projectnm"%>" id=" <%="projectnm"%>">
<%
set alltype=conn.execute("select id,projectnm,leader from projects group by leader,projectnm,id order by leader desc")
do while not alltype.eof
if alltype("id")=mytasks("projectid") then
%>
<option value=" <%=alltype("id")%>" selected> <%=alltype("projectnm")%> </option>
<%
else
%>
<option value=" <%=alltype("id")%>"> <%=alltype("projectnm")%> </option>
<%
end if
alltype.movenext
loop
alltype.close
set alltype = nothing
%>
</select> </div></td>
<td width="35%" bgcolor="#FFFFFF"> <div align="left"> <%=mytasks("taskdes")%> </div> </td>
<td width="5" bgcolor="#FFFFFF"> <div align="center">
<input type="button" name="btnAuditing" value="修改" onClick="OnModify(' <%=logid%>',' <%=memid%>',' <%=auditingweek%>',' <%=mytasks("taskid")%>')">
</div> </td>
</tr>
<%
mytasks.movenext
loop
mytasks.close
set mytasks=nothing
%>
回复
myvicy 2008-04-02
代码写整齐一点比较容易查出错误.
你有3个多条语句的if,却只有一个end if肯定有错误了。
回复
小逗狗 2008-04-02
<tr>
<%
set memgroup=conn.execute("select * from blog_member where mem_ID="& memid)
memname=memgroup("mem_name")
memgroup.close()
set memgroup=nothing
%>

<%
mysql="select taskid,logid,state,realtime,plantime,projectid,projectnm,taskdes ,completerate from projecttasks p,phase h,projects r where p.projectid=r.id and p.phaseid=h.phaseid and logid=" & logid &" and memberid=" & memid &" order by memberid"
set mytasks=conn.execute(mysql)
if not mytasks.eof and not mytasks.bof then
do while not mytasks.eof

%>



<td width="10%" bgcolor="#FFFFFF"> <div align="center"> <%=memname%> </div> </td>
<td width="15%" bgcolor="#FFFFFF"> <div align="left">
<select name=" <%="projectnm"%>" id=" <%="projectnm"%>">
<%
set alltype=conn.execute("select id,projectnm,leader from projects group by leader,projectnm,id order by leader desc")
if not alltype.eof and not alltype.bof then
do while not alltype.eof



if alltype("id")=mytasks("projectid") then
%>
<option value=" <%=alltype("id")%>" selected> <%=alltype("projectnm")%> </option>
<%
else

%>
<option value=" <%=alltype("id")%>"> <%=alltype("projectnm")%> </option>
<%



end if
alltype.movenext
loop
alltype.close
set alltype = nothing
end if
%>


</select> </div> </td>

<td width="35%" bgcolor="#FFFFFF"> <div align="left"> <%=mytasks("taskdes")%> </div> </td>
<td width="5" bgcolor="#FFFFFF"> <div align="center">
<input type="button" name="btnAuditing" value="修改" onClick="OnModify(' <%=logid%>',' <%=memid%>',' <%=auditingweek%>',' <%=mytasks("taskid")%>')">
</div> </td>



</tr>


<%

mytasks.movenext
loop
mytasks.close
set mytasks=nothing
end if
%>
有三个IF 却只有一个End if
回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2008-04-02 07:17
社区公告
暂无公告