codice:
domain = Request.ServerVariables("HTTP_HOST") 'Host
dir = Request.ServerVariables("PATH_INFO") 'Directory di base
q_string = replace(Request.ServerVariables("QUERY_STRING"), "&", "&") 'Query string
if q_string = "" or IsNull(q_string) then
path_completo = dir 'Path completo
else
path_completo = dir &"?"& q_string 'Path completo
end if
dirArr = Split(path_completo, "/")
pag_corrente = uBound(dirArr)-1
sDoveSei = ""
sHome = "Home»"
if pag_corrente > 0 then
For i = 1 to pag_corrente
if i > 1 then sDoveSei = sDoveSei &"»"
if q_string &"[]" <> "[]" and i = pag_corrente then
'Se sto all'ultima cartella aggiungo la querystring se esiste
path = path & "/" & dirArr(i) & "/?" & q_string
else
path = path & "/" & dirArr(i)
end if
'Per il link e il title
primaLettera = ucase(left(dirArr(i), 1))
resto = mid(replace(dirArr(i), "_", " "), 2)
resto = replace(resto, ".asp","")
if i = pag_corrente then
sDoveSei = sDoveSei & primaLettera & resto
else
sDoveSei = sDoveSei &""& primaLettera&resto &""
end if
Next
sDoveSei = sHome & sDoveSei
end if
Roby