欢迎光临
我们一直在努力

ASP中检查没有数据提交的页面Ⅱ

建站超值云服务器,限时71元/月

asp中检查没有数据提交的页面ⅱ

2000-08-27· 编译:甘冀平·yesky

对于一个表单,使用put和get方法

这同样适用于从带有查询字符串连接而来的页面,比如?id=236454

< %

if request.querystring = "" then

response.write("< p align=""center"" >< font face=""arial"" >there was an

error.< br >" & vbcrlf)

response.write("no data was posted.< /font >

" & vbcrlf)

response.end

end if

% >

为了含概上面例子中的情况,要做下面的工作。尽管还有简单的方法,但是这个例子对于初学者,将是很好的学习基本原理的方法。

< %

isdata = 0

if request.form < > "" then isdata = isdata + 1

if request.querystring < > "" then isdata = isdata + 1

if isdata = 0 then

response.write("< p align=""center"" >< font face=""arial"" >there was an error.< br >" & vbcrlf)

response.write("no data was posted.< /font >

" & vbcrlf)

response.end

end if

% >

或者

< %

isdata = "no"

if request.form < > "" then isdata = "yes"

if request.querystring < > "" then isdata = "yes"

if isdata = "no" then

response.write("< p align=""center"" >< font face=""arial"" >there was an error.< br >" & vbcrlf)

response.write("no data was posted.< /font >

" & vbcrlf)

response.end

end if

%>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » ASP中检查没有数据提交的页面Ⅱ
分享到: 更多 (0)