直播中
對于一個表單,使用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
% >
為了含概上面例子中的情況,要做下面的工作。盡管還有簡單的方法,但是這個例子對于初學(xué)者,將是很好的學(xué)習(xí)基本原理的方法。
< %
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
%>