[thelist] ASP Beginner Help Please

aardvark roselli at earthlink.net
Tue Mar 21 10:19:09 2000


Including Files in ASP
http://evolt.org/index.cfm?menu=8&cid=1344&catid=17

that will give you the nitty gritty of sharing files...

from there, you can include any script or plain HTML across 
multiple files, but you will need to rename them all to .asp...

if you want certain nav elements to be different depending on which 
page you are visiting, capture the name of the current script using 
Request.ServerVariables("SCRIPT_NAME") ...set that equal to a 
variable so it's easier to call...

then you can compare the name of the current script with a 
predefined option to see if it qualifies, and then display the 
appropriate image:

<% ScriptName = Request.ServerVariables("SCRIPT_NAME") %>

<% IF instr(1,ScriptName,"overview/",1) > 0 then %>
 <b> show HTML here</b>
<% ELSE %>
 <b> show HTML here</b>
<% END IF %>

the instr() function simply says if the name of the current script 
includes the word 'overview,' then display the first option, otherwise 
display the second...

dig?

> From:  "Michele Foster" <michele@wordpro.on.ca>
> 
> What I want to do is be able to "pull in" standard template file(s)
> into my HTML file.  Such as headers, side navigation bar, footer
> material that is exactly the same on each page (including all the
> JavaScript and mouseover info).  So that, if I update the header or
> add a button to the side navigation, I don't have to edit ALL the
> files, but just the template.