🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.csharpbuilder.aspdotnet.general
4 messages
4 total messages Started by century Mon, 19 Jul 2004 05:22
how to keep object session?
#7
Author: century
Date: Mon, 19 Jul 2004 05:22
6 lines
1017 bytes
I use com object in aspx page,
but how to keep this object session, then I can invoke it in second page.
(Page Language="C#")

Thanks,
Century
Re: how to keep object session?
#8
Author: Marc Rohloff TeamB
Date: Mon, 19 Jul 2004 11:32
19 lines
1269 bytes
On Mon, 19 Jul 2004 13:22:27 +0800, century wrote:

> I use com object in aspx page,
> but how to keep this object session, then I can invoke it in second page.
> (Page Language="C#")

You mean:
Page1:
 session["comobj"] = yourComObject;
 
Page2:
  ComObject yourComObject = (ComObject)Session["comobj"] 
 
?


-- 
Marc Rohloff [TeamB]
marc rohloff at myrealbox dot com
Re: how to keep object session?
#9
Author: century
Date: Tue, 20 Jul 2004 01:11
40 lines
1743 bytes
Yes, as following:

Page1:
testClass el = new testClass();

Session["comobj"] = el;
....
Page2:
testClass te = (testClass)Session["comobj"];
String strVersion = te.login("DOTNET","  Welcome");
Response.Write(strVersion);



But  Session["test"] is not  viable .

Thanks,

"Marc Rohloff [TeamB]" <"on request">
??????:1opwugyw8fhj4$.dlg@marcrohloff.40tude.net...
> On Mon, 19 Jul 2004 13:22:27 +0800, century wrote:
>
> > I use com object in aspx page,
> > but how to keep this object session, then I can invoke it in second
page.
> > (Page Language="C#")
>
> You mean:
> Page1:
>  session["comobj"] = yourComObject;
>
> Page2:
>   ComObject yourComObject = (ComObject)Session["comobj"]
>
> ?
>
>
> --
> Marc Rohloff [TeamB]
> marc rohloff at myrealbox dot com
Re: how to keep object session?
#10
Author: Marc Rohloff TeamB
Date: Tue, 20 Jul 2004 11:14
19 lines
1413 bytes
On Tue, 20 Jul 2004 09:11:47 +0800, century wrote:

> Page1:
> testClass el = new testClass();

> Session["comobj"] = el;
> ....
> Page2:
> testClass te = (testClass)Session["comobj"];
> String strVersion = te.login("DOTNET","  Welcome");
> Response.Write(strVersion);

> But  Session["test"] is not  viable .

What do you mean by not viable? What does or doesn't happen?

-- 
Marc Rohloff [TeamB]
marc rohloff at myrealbox dot com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads