与经典 ASP 中 ASP.NET 的 HttpContext.Current.Items 等效的是什么?

发布于 2024-07-21 16:29:33 字数 94 浏览 4 评论 0原文

HttpContext.Current.Items 是一个具有 HTTP 请求生命周期的存储。

我想知道与此等效的经典 ASP。

HttpContext.Current.Items is a store that has a life span of the HTTP request.

I'd like to know the Classic ASP equivalent of this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

↘紸啶 2024-07-28 16:29:33

经典 ASP 中没有类似的功能。 为此,您只有请求、响应、会话、应用程序、服务器等对象。

There is no equivalent of that in Classic ASP. You only have objects like Request, Response, Session, Application, Server for that purpose.

战皆罪 2024-07-28 16:29:33

您可以使用 Session 以类似的方式从一个页面存储到另一个页面:

Session("MyVar") = "my value to keep"

但是在 ASP 中,没有像在 .net 中使用用户控件等那样跳过太多页面。使用一些全局变量可能会更好?

如果您给我们提供更多背景信息(没有双关语),也许可以更好地为您指明正确的方向。

You could use Session to store stuff from page to page in a similar manner:

Session("MyVar") = "my value to keep"

But in ASP theres not much skipping around pages as you would in .net with user controls etc. You might be better off with some globals?

If you give us a bit more context (no pun intended) might be able to point you in the right direction better.

稀香 2024-07-28 16:29:33

具有全局作用域的集合对象可以完成同样的事情。

A collection object with global scope would accomplish the same thing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文