ASPxtoASP.ASP
4 then
Response.Redirect(Session("DestPage"))
end if
'-----------------------输出所有的Session------------------------------------------------
call allsession() '使用时注释掉此行代码即可
function allsession()
Response.Write "There are " & Session.Contents.Count &" Session variables
"
Dim strName, iLoop
For Each strName in Session.Contents'使用For Each循环察看Session.Contents
If IsArray(Session(strName)) then '如果Session变量是一个数组? '循环打印数组的每一个元素
For iLoop = LBound(Session(strName)) to UBound(Session(strName))
Response.Write strName & "(" & iLoop & ") - " & _
Session(strName)(iLoop) & "
"
Next
Else '其他情况,就简单打印变量的值
Response.Write strName & " - " & Session.Contents(strName) & "
"
End If
Next
end function
'------------------------------------------------------------------------------------------
%>
代码实现的过程中,ASP.net页面提交到ASP页的时候不能使用Server.Transfer方法,所以只好用Response.Write来自己写Form表单提交。
代码中还有要改进的地方也请各位大虾赐教。

