- ASP - Read/Write
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·What's New?
Mail List


Directory Drill Down
Many websites have some form of hyperlink navigation as you drill down further into the site.  Many times the scheme that the drilldown follows is the directory path of the site.  If this is how our site is structured you may benefit from this example that can be placed on any asp document.  Utilizing two server variables (http_host and script_name) and splitting the script_name by the "/" delimiter you can effortlessly add hyperlinks to all the parent directories in your web.
View the Output
Text View
Print View
Mail this Link
Download the Code

<title> Drill Down)</title>
<body bgcolor="#FFFFFF">
'Capture the name of the host server and add http:// to the varible
host= "http://" & request.servervariables("http_host")

'Caputre the name of the page as well as directory structure

'Split the directory tree into an arry by /

'Sets the number of directory levels down
'this document is from the top level directory
'--remove the -1 if you wish to display the name of the page
' with the hyperlink drill down --

<a href="<%= host %>">
<%= host %></a><%
'Loop that will output all of the parent directories
'and hyperlink them

for counter= 1 to (num_directory)
link=link & "/"& split_name(counter) %>
href="<%= link %>"><%= split_name(counter) %></a><%
next %>




ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement is hosted by
    Donate Food Online with a Mouse Click at
    Donate Land Online with a Mouse Click at
    © 1999 - 2018
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3