在程序中定義Session
Session("example")= "OK"
在另一個頁面使用Session
Dim Str As String= Session("Example")
則
str= "OK"
Session("example")= "OK"
在另一個頁面使用Session
Dim Str As String= Session("Example")
則
str= "OK"
在global.asax中的application_OnStart过程加入
session("CompanyTelephone") = "555 4321"
就能在其他任何网页使用 session("CompanyTelephone")
如
Company Telephone = <% Response.Write(Application("CompanyTelephone")) %>