threading question

G

Guest

Let's say I have a thread, long running, span by page1.
I'm redirected to page2.
In order to stop process in the thread i need to send command.close().
Q: can i store a reference to a command object in the Session variable and
how?
 
G

Guest

Oleg,
Generally speaking you are going to have a lot of difficulty with the
concept of spawning a background thread from an aspx page because of the
built-in transient nature of the Page class.

Consider having a class in Application state whose method does this.
Peter
 
G

Guest

It would have to be in Session..
Are you saying to run it asynchronosly from the page? I'm not sure how.

I already have a thread creating a Dataset and eventually storing result in
Session. Now I need to cancel db call, like in Command.Cancel().

Oleg
 
G

Guest

By the way, the reason for reference was because myobject.command may change
a value while thread is working. So I wanted to keep a reference to it like
you would send a reference inside a function call.
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top