0

I would like to call a function from another file in the Session_OnStart part if global.asa, so I could declare some Session("variables") according to some data.

Is it possible?
How?

Edit: I found a workaround, where I have a global functions file that I include everywhere. So I added to the code to this file. It's not perfect, because even though it's a small piece of code, it still runs every refresh, instead of once at the Session_OnStart.

Any other solutions?

4

1 回答 1

0

确实不可能将包含文件添加到 global.asa。您可以执行以下操作:

在会话中创建一个“标志”,表明它是否是新会话。将其填入 Session_OnStart(即 Session("NewSession") = True)并在执行全局函数之前验证这一点。

于 2014-04-07T20:58:12.997 回答