Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > One Subroutine after another

Reply
Thread Tools

One Subroutine after another

 
 
MRW
Guest
Posts: n/a
 
      08-31-2006
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!

 
Reply With Quote
 
 
 
 
David Wier
Guest
Posts: n/a
 
      08-31-2006
Show us your code on how your calling the two routines

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com



"MRW" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> 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!
>



 
Reply With Quote
 
 
 
 
MRW
Guest
Posts: n/a
 
      08-31-2006
Very simply:

subRoutine1()
subRoutine2()



David Wier wrote:
> Show us your code on how your calling the two routines
>
> --
> David Wier
> MVP/ASPInsider
> http://aspnet101.com
> http://aspexpress.com
>
>
>
> "MRW" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) ups.com...
> > 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!
> >


 
Reply With Quote
 
Marina Levit [MVP]
Guest
Posts: n/a
 
      08-31-2006
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.

"MRW" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Very simply:
>
> subRoutine1()
> subRoutine2()
>
>
>
> David Wier wrote:
>> Show us your code on how your calling the two routines
>>
>> --
>> David Wier
>> MVP/ASPInsider
>> http://aspnet101.com
>> http://aspexpress.com
>>
>>
>>
>> "MRW" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed) ups.com...
>> > 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!
>> >

>



 
Reply With Quote
 
MRW
Guest
Posts: n/a
 
      08-31-2006
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!

Marina Levit [MVP] wrote:
> 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.
>
> "MRW" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) ups.com...
> > Very simply:
> >
> > subRoutine1()
> > subRoutine2()
> >
> >
> >
> > David Wier wrote:
> >> Show us your code on how your calling the two routines
> >>
> >> --
> >> David Wier
> >> MVP/ASPInsider
> >> http://aspnet101.com
> >> http://aspexpress.com
> >>
> >>
> >>
> >> "MRW" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed) ups.com...
> >> > 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!
> >> >

> >


 
Reply With Quote
 
John Timney \(MVP\)
Guest
Posts: n/a
 
      08-31-2006
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)

--
--
Regards

John Timney (MVP)
"MRW" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> 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!
>
> Marina Levit [MVP] wrote:
>> 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.
>>
>> "MRW" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed) ups.com...
>> > Very simply:
>> >
>> > subRoutine1()
>> > subRoutine2()
>> >
>> >
>> >
>> > David Wier wrote:
>> >> Show us your code on how your calling the two routines
>> >>
>> >> --
>> >> David Wier
>> >> MVP/ASPInsider
>> >> http://aspnet101.com
>> >> http://aspexpress.com
>> >>
>> >>
>> >>
>> >> "MRW" <(E-Mail Removed)> wrote in message
>> >> news:(E-Mail Removed) ups.com...
>> >> > 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!
>> >> >
>> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
use one subroutine's variable value in another subroutine inside a module. king Perl Misc 5 04-29-2007 06:39 AM
How to load another aspx page within a VB subroutine? Oscar ASP .Net 3 10-01-2006 01:12 AM
Calling another subroutine sck10 ASP .Net 3 08-15-2005 05:27 PM
Using One XSLT and multiple XML Problem (One is XML and another one is XBRL) loveNUNO XML 2 11-20-2003 06:47 AM
Passing value from one script on one page to another script on another page. Robert Cohen ASP General 3 07-15-2003 01:46 PM



Advertisments