One Subroutine after another

M

MRW

Hello!

I'm running two subroutines one after another. The first subroutine
works and does something to a several session variables (just an
example), then those session variables are accessed by the second
subroutine.

I'm noticing however, that it looks like the second subroutine is being
called before the first is done.

Does anybody have any experience with this?

Thanks for any help!
 
M

Marina Levit [MVP]

No, I don't think that can happen. There must be something else going on
that is making you think that this is the case.
 
M

MRW

Okay, thanks... I wasn't too sure... I've programmed in Flash before
where things like that can happen if your not careful. Wasn't sure if
there was something similar in NET.

Thanks again!
 
J

John Timney \(MVP\)

Well it can happen, but it could probably only happen if routine 1 started
something asynchronous - an asynchronous (non-blocking) call to web service
perhaps or making use of an IHttpAsyncHandler that altered session on
completion. if it didn't wait for a return before exciting the method a
session enabled webservice method or an ihttpasync EndProcessRequest could
alter session values while the worker thread went on to execute routine 2!
However, you would have had to code this in and its not for the faint
hearted.

If your not coding that complex an application then its unlikely to be
executing routine2 before 1 completes.
-
Regards

John Timney (MVP)
 

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,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top