请教下面asp的代码为什么不显示?

来源:百度知道 编辑:UC知道 时间:2024/09/23 14:24:25
文件response.asp

错误类型:
Microsoft VBScript 编译器错误 (0x800A03F6)
缺少 'End'
/response.asp, 第 41 行

代码:
<%
Dim user
Dim flag
Dim pwd
Dim say
Response.buffer=true'开启缓冲页面功能
Response.ContentType="text/html"
Response.Charset="gb2312"
user=Request.Form("username")
pwd=Request.Form("password")
say=Request.QueryString("say")
%>
<form method="POST" action="asp7b.asp">
<p> 用户名:<input type="text" name="username" size="12"><br>
<P> 口令:<input type="password" name="password" size="12"><br>
<input type="sumbit" value="提交" name="B1">
<input type="reset" value="重置" name="B2">
</p>
</form>
<%
If say=

If user="x" and pwd="hello" Then
Response.Expires=1'设置页面在浏览器的缓冲中存储中1分钟后过期。
flag=1
Else If user="guest" and pwd="guest" then
response.Expires=0'使缓存的页面立即过期。
response.clear'清空存储在缓存中的页面
flag=2
Else if user="vip" and pwd="vip" then
response.write"欢迎VIP光临网站!"
flag=3
Else
flag=0
Response.end '立即停止脚本处理,并将缓存中的页面输出
End if

asp中的else if 是不分开的,应该写成:Elseif

少了end if
解决方法 是在后面加个end if或者把

Else if user="vip" and pwd="vip" then
这里必成

Elseif user="vip" and pwd="vip" then