ASP,而不是ASP.NET,可以向会话添加对象 [英] Can ASP, not ASP.NET, add an object to the session

查看:64
本文介绍了ASP,而不是ASP.NET,可以向会话添加对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道这有可能吗?如果是,怎么样?

如果没有,任何其他方法可以做类似的事情吗?

Anyone know that is it possible? if yes, how?
if no, any other method can do something similar to this?

推荐答案

ASP和ASP .net是完全不同的ISAPI,并在不同的
流程下运行。因此,您不能使用ASP写入ASP.Net会话。您可以做的是
将您的ASP变量通过QueryString或表单提交传递给

一个将值写入ASP.Net会话的ASPX页面。这可以透明地完成,通过使用ASP页面中的Response.Redirect将QueryString中的

变量传递给ASPX页面,并在ASPX页面中使用

Response.redirect返回到你想要返回的地方,例如

原始ASP页面。


-

HTH,


Kevin Spencer

Microsoft MVP

..Net开发人员
< a rel =nofollowhref =http://www.takempis.comtarget =_ blank> http://www.takempis.com

大事做成

很多小事。


" Galileo" <一个******* @ discussions.microsoft.com>在留言中写道

新闻:D5 ********************************** @ microsof t.com ...
ASP and ASP.net are completely different ISAPIs, and run under different
processes. Therefore, you can''t use ASP to write to an ASP.Net Session. What
you CAN do is pass your ASP variables via QueryString or Form submission to
an ASPX page that writes the values to the ASP.Net Session. This can be done
transparently, by using Response.Redirect in the ASP page to pass the
variables in a QueryString to an ASPX page, and in the ASPX page using
Response.redirect to return to wherever you want to return to, such as the
original ASP page.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Galileo" <an*******@discussions.microsoft.com> wrote in message
news:D5**********************************@microsof t.com...
任何人都知道这有可能吗?如果是,如何?
如果不是,任何其他方法都可以做类似的事情吗?
Anyone know that is it possible? if yes, how?
if no, any other method can do something similar to this?



ASP和ASP.net是完全不同的ISAPI ,并在不同的
流程下运行。因此,您不能使用ASP写入ASP.Net会话。您可以做的是
将您的ASP变量通过QueryString或表单提交传递给

一个将值写入ASP.Net会话的ASPX页面。这可以透明地完成,通过使用ASP页面中的Response.Redirect将QueryString中的

变量传递给ASPX页面,并在ASPX页面中使用

Response.redirect返回到你想要返回的地方,例如

原始ASP页面。


-

HTH,


Kevin Spencer

Microsoft MVP

..Net开发人员
< a rel =nofollowhref =http://www.takempis.comtarget =_ blank> http://www.takempis.com

大事做成

很多小事。


" Galileo" <一个******* @ discussions.microsoft.com>在留言中写道

新闻:D5 ********************************** @ microsof t.com ...
ASP and ASP.net are completely different ISAPIs, and run under different
processes. Therefore, you can''t use ASP to write to an ASP.Net Session. What
you CAN do is pass your ASP variables via QueryString or Form submission to
an ASPX page that writes the values to the ASP.Net Session. This can be done
transparently, by using Response.Redirect in the ASP page to pass the
variables in a QueryString to an ASPX page, and in the ASPX page using
Response.redirect to return to wherever you want to return to, such as the
original ASP page.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Galileo" <an*******@discussions.microsoft.com> wrote in message
news:D5**********************************@microsof t.com...
任何人都知道这有可能吗?如果是,怎么样?
如果不是,任何其他方法可以做类似的事情吗?
Anyone know that is it possible? if yes, how?
if no, any other method can do something similar to this?



你在谈论什么对象? />
字符串也是对象。


你可以在会话中添加字符串。


如果对象是COM对象那么它取决于这个对象的编写方式。

COM对象被声明为Free Threaded并聚合FTM可以将

添加到ASP中的Session中。


BTW:你不能在VB中编写这样的对象。只有C ++。


乔治。


" Galileo" <一个******* @ discussions.microsoft.com>在留言中写道

新闻:D5 ********************************** @ microsof t.com ...
What object you are talking about?
String is object too.

You can add string to the Session.

If object is COM object then it depends on how this object is written.
COM object which is declared as Free Threaded and aggregates FTM can be
added to the Session in ASP.

BTW: You can not write such objects in VB. Only C++.

George.

"Galileo" <an*******@discussions.microsoft.com> wrote in message
news:D5**********************************@microsof t.com...
任何人都知道这有可能吗?如果是,怎么样?
如果不是,任何其他方法可以做类似的事情吗?
Anyone know that is it possible? if yes, how?
if no, any other method can do something similar to this?



这篇关于ASP,而不是ASP.NET,可以向会话添加对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆