Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Application wide subroutines


Message #1 by ghartge@u... on Mon, 28 Jan 2002 20:51:45
Is it possible in ASP to use a subroutine and/or function for an entire application? I.E. call the
subroutine or function 

from any page in the application?



Thanks!
Message #2 by Thomas Bellavia <TBellavia@V...> on Tue, 29 Jan 2002 09:55:38 -0500
Why don't you just create an ASP page and place your repetitive code

(script) on it. Then just use it as your 'action' target page...



-----Original Message-----

From: ghartge@u... [mailto:ghartge@u...] 

Sent: Monday, January 28, 2002 3:52 PM

To: ASP Databases

Subject: [asp_databases] Application wide subroutines



Is it possible in ASP to use a subroutine and/or function for an entire

application? I.E. call the subroutine or function 

from any page in the application?



Thanks!




$subst('Email.Unsub').

Message #3 by "John Wm. Wicks" <j_wicks@p...> on Wed, 30 Jan 2002 14:36:25 -0800
Hello,



ASP Databases digest wrote:



>-----Original Message-----

>From: ghartge@u... [mailto:ghartge@u...] 

>Sent: Monday, January 28, 2002 3:52 PM

>To: ASP Databases

>Subject: [asp_databases] Application wide subroutines

>

>Is it possible in ASP to use a subroutine and/or function for an entire

>application? I.E. call the subroutine or function 

>from any page in the application?

>

>Thanks!

>

I suppose you could setup an ASP page and use the Server.Execute method 

?? Are Server side includes not enough ?? Or here's a thought if the 

subroutine is small enough you could set an Application variable and use 

the Execute method.



strMyRoutine = "Sub MyRoutine( byRef nSomeVal )" & vbcrlf _

                             & "'Enter your code for the routine here" & 

vbcrlf _

                             & "End Sub" & vbcrlf



Execute strMyRoutine

MyRoutine( nSomeOtherVal )



John




  Return to Index