Ask a Question related to ASP Components, Design and Development.
-
Larry Woods #1
I need to save a class object in a Session variable. Good? Bad?
Hi,
I am in a situation where I am forced into passing a class object around
between a bunch of pages. The only way that I can figure out how to do it
is storing the object instance in a Session variable. I believe that this
is possible, but my concern is whether it gets destroyed at end of session.
Any comments?
Thanks.
Larry Woods
Larry Woods Guest
-
Variable Scope Within a Object Class
I am trying to create a class similar to the one shown below. I am having a hard time figuring out why "someProperty" is returned as undefined. I... -
Loading of Class Object passed via PHP Session fails!
Hello! I try to use PHP session function, and it doesn't work properly. :-( I want to pass a whole object from site A to site B to minimize... -
HELP: My ASP class object is crippled if I save it in a session collection
I am using ASP3.0 and IIS5 I want to have OOP so I have define a class call Employee with property 'fullName' and methods like getFullName(). ... -
ASP class-session variable
Hiya - Big puzzler for me. Code Below I create a class. I save it to a session variable. Then, I retrieve the session variable back into a new... -
class -session variable
Hi, I want to do things this way: I have a bunch of stuff that I want to keep track of while a user is connected to the site. Maybe 50 little... -
Kris Eiben #2
Re: I need to save a class object in a Session variable. Good? Bad?
Most of the advice you'll get will probably be a variation on this:
[url]http://www.aspfaq.com/show.asp?id=2053[/url]
Is there any way you can use a database table to store all the relevant
data from the object, and just store the ID for that row in a session
variable? You could create the object with the appropriate data on each
page, by querying the data, and store the data just before you destroy
the object at the bottom of the page. (I'd use include files for this.)
You could make the ID into a cookie if you wanted the data to persist
past the session.
"Larry Woods" <larry@lwoods.com> wrote in message
news:eRhYcL4WDHA.2376@TK2MSFTNGP11.phx.gbl...around> Hi,
>
> I am in a situation where I am forced into passing a class objectdo it> between a bunch of pages. The only way that I can figure out how tothis> is storing the object instance in a Session variable. I believe thatsession.> is possible, but my concern is whether it gets destroyed at end of
Kris Eiben Guest
-
Larry Woods #3
Re: I need to save a class object in a Session variable. Good? Bad?
Yeah, Kris. I knew the answer to "store an object in a Session variable" is
"NO!", but I have a BUNCH of arrays, variables that are being used in the
component. I have decided to get the values thru GET properties, store the
values in Session variables. I'll then recreate the object and reload the
variables via LET properties when I need the object again. Bunch of typing,
but safest.
Thanks,
Larry Woods
"Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote in message
news:Oai7Zi4WDHA.2424@TK2MSFTNGP12.phx.gbl...> Most of the advice you'll get will probably be a variation on this:
> [url]http://www.aspfaq.com/show.asp?id=2053[/url]
>
> Is there any way you can use a database table to store all the relevant
> data from the object, and just store the ID for that row in a session
> variable? You could create the object with the appropriate data on each
> page, by querying the data, and store the data just before you destroy
> the object at the bottom of the page. (I'd use include files for this.)
> You could make the ID into a cookie if you wanted the data to persist
> past the session.
>
> "Larry Woods" <larry@lwoods.com> wrote in message
> news:eRhYcL4WDHA.2376@TK2MSFTNGP11.phx.gbl...> around> > Hi,
> >
> > I am in a situation where I am forced into passing a class object> do it> > between a bunch of pages. The only way that I can figure out how to> this> > is storing the object instance in a Session variable. I believe that> session.> > is possible, but my concern is whether it gets destroyed at end of
>
>
Larry Woods Guest
-
Adrian Forbes - MVP #4
Re: I need to save a class object in a Session variable. Good? Bad?
That is the best way to do it really. Rather than lots of
properties you could try using a serialise technicque
where you get your object to return its data as an XML
string, and give it the ablity to restore itself from this
xml also.
Session variable" is>-----Original Message-----
>Yeah, Kris. I knew the answer to "store an object in abeing used in the>"NO!", but I have a BUNCH of arrays, variables that areproperties, store the>component. I have decided to get the values thru GETobject and reload the>values in Session variables. I'll then recreate theagain. Bunch of typing,>variables via LET properties when I need the objectmessage>but safest.
>
>Thanks,
>
>Larry Woods
>
>"Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote invariation on this:>news:Oai7Zi4WDHA.2424@TK2MSFTNGP12.phx.gbl...>> Most of the advice you'll get will probably be aall the relevant>> [url]http://www.aspfaq.com/show.asp?id=2053[/url]
>>
>> Is there any way you can use a database table to storerow in a session>> data from the object, and just store the ID for thatappropriate data on each>> variable? You could create the object with thebefore you destroy>> page, by querying the data, and store the data justfiles for this.)>> the object at the bottom of the page. (I'd use includedata to persist>> You could make the ID into a cookie if you wanted theclass object>> past the session.
>>
>> "Larry Woods" <larry@lwoods.com> wrote in message
>> news:eRhYcL4WDHA.2376@TK2MSFTNGP11.phx.gbl...>> > Hi,
>> >
>> > I am in a situation where I am forced into passing afigure out how to>> around>> > between a bunch of pages. The only way that I canvariable. I believe that>> do it>> > is storing the object instance in a Sessiondestroyed at end of>> this>> > is possible, but my concern is whether it gets>>> session.
>>
>>
>
>.
>Adrian Forbes - MVP Guest



Reply With Quote

