开发者

Application level variable initialization in asp classic

开发者 https://www.devze.com 2023-04-12 11:00 出处:网络
I have legacy ASP classic website. If I dump all the application variables using For Each item In Application.Contents

I have legacy ASP classic website. If I dump all the application variables using

For Each item In Application.Contents 
    Response.Write item & " = " &a开发者_如何转开发mp; Application(item) 
    Response.Write "<br>"      
Next 

They are all initialized but there is no global.asa file in this application. Where else the initialization code might be?


  1. just add this code in any .asp file and add this file as a top usercontrol in every page so you will get this variable on all pages

  2. session is the other option , you can assign all variable in session and can access in any page (I do not recommend this.)

0

精彩评论

暂无评论...
验证码 换一张
取 消