Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 trimming text
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

concep86
Junior Member

USA
140 Posts

Posted - 16 April 2001 :  11:49:37  Show Profile  Visit concep86's Homepage
I get a url using the
Request.ServerVariables("URL")&request.servervariables("script_name")

the result is http://www.xyzcompany.com/directory/asppasge.asp


I need to truncate or trim the asppage.asp protion and only keep upto http://www.xyzcompany.com/directy/

How can this be done...

Thanks

Concep86
Webmaster
http://www.coneciones.com

gor
Retired Admin

Netherlands
5511 Posts

Posted - 16 April 2001 :  11:55:26  Show Profile  Visit gor's Homepage
You can use:

strShortPath = Left(strPath_Info, InstrRev(strPath_Info, "/"))

where strPath_Info is http://www.xyzcompany.com/directory/asppasge.asp
and strShortPath contains: http://www.xyzcompany.com/directory/

(now that I'm typing it, I'm not sure if it also returns the / at the end, please check and if not add it)

Pierre
Join the Snitz WebRing
Go to Top of Page

concep86
Junior Member

USA
140 Posts

Posted - 16 April 2001 :  12:32:50  Show Profile  Visit concep86's Homepage
Thanks Gor... That did it...

Concep86



Concep86
Webmaster
http://www.coneciones.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.24 seconds. Powered By: Snitz Forums 2000 Version 3.4.07