When you access an ASP page with INCLUDEs then IIS simply cut and pastes the
files together and runs it though the parser.  Any request to get the
requested URL will result in the URL of the parent ASP page.

If you wanted some form of programmatic solution then you could add a var at
the top of your ASP page like;

bHaveIncluded = true

And in your code in the included file you could only run the procedure if
bHaveIncluded  is true.  This will mean that running the code on its own
would not work.

-----Original Message-----
From: Thierry Lavall�e [mailto:[EMAIL PROTECTED] 
Sent: 24 September 2004 4:51
To: [EMAIL PROTECTED]
Subject: Re: [ASP] Not run directly, only through include


Hi Adrian,
I was sure that with HTTP headers we could pull the requested URL with the
calling script name and compare it somehow with the name of the current
file. Thanks!
-- 
Thierry

---> Adrian Forbes - ITD, 9/24/04 11:40 :

> As INCLUDES are done before ASP code is run you can't really tell if 
> something is a result of an INCLUDE or not.




---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links



 


The contents of this email and any attachments are sent for the personal attention
of the addressee(s) only and may be confidential.  If you are not the intended
addressee, any use, disclosure or copying of this email and any attachments is
unauthorised - please notify the sender by return and delete the message.  Any
representations or commitments expressed in this email are subject to contract. 
 
ntl Group Limited



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to