没分给了~但希望高手能帮我解决这个问题。

ekway 2003-08-23 03:23:09
我写了这句:
<%if session("flag")<>"1" then
Response.Redirect"index.asp"%>
<%end if%>
就可以返回index.asp,但
<%if session("flag")<>"1" then Response.Redirect"index.asp"%>
<%end if%>
却出现以下错误:

错误类型:
Microsoft VBScript 编译器错误 (0x800A03F8)
缺少 'Sub'
/guestbook/del.asp, line 13, column 4
end if
---^

请问这是什么原因呢?
...全文
25 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wjh6of6agriculture 2003-08-23
  • 打赏
  • 举报
回复
实在要写end if 和 if then 1行上
zzh20 2003-08-23
  • 打赏
  • 举报
回复
ttt2 2003-08-23
  • 打赏
  • 举报
回复
<%if session("flag")<>"1" then Response.Redirect"index.asp"%>
这样写后就不用下面的<%end if%> 去掉就可以了

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧