Can ASP, not ASP.NET, add an object to the session

G

Guest

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

Kevin Spencer

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.
 
G

George Ter-Saakov

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.
 
S

Scott M.

Anything you add to the ASP Session object will not become a part of the
ASP.NET Session object.
 
G

George Ter-Saakov

As I understood it's not a requirement.

The question was about ASP and ASP session.

At least that is how I understand it.

George.
 
G

Guest

This is my user-defined class
class ABC
public CC
end class

I make a instance of it and store it at the session
set ee=new ABC
ee.CC="hi"
set Session("myobject")=ee



But when i retrieve it and access the property of my
object, it said that The object does not support this
property or method, is that ASP cannot do this, or my
code has error?
set eee=Session("myobject")
response.write eee.cc
 
G

George Ter-Saakov

I never worked with ASP classes but my guess would be that you can not keep
them in the Session.

George.
 
R

Rajesh.V

I think depending on the object if it implemnts ISerializable, it can be
added to the session.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top