Click to See Complete Forum and Search --> : Dynamic title


nookiemon
06-16-2006, 07:27 PM
Sure this is an easy one but not sure on the syntax.

tp=request.ServerVariables("URL")

I.e tp would be "/home.asp"

I want to put this in my title but do remove the / and the .asp and make it proper.

I would use this PROPER(MID(tp,2,(FIND(".",tp))-2)) but no idea how to translate it into asp syntax.

Help much appreciated

russell
06-16-2006, 09:21 PM
tp = Request.ServerVariables("URL")

tp = Replace(Replace(tp, "/", ""), ".asp", "")

Of course, if tp = "http://mysite.com/parentDirectory/subdirectory/sub/file.asp"

then you have a little more work to do.

check out the instr and instrrev functions...