How to get path of root web site when app is two levels deep?

J

John Dalberg

I have an asp.net app that is in a folder which is two levels under the
website root folder. The website has a login.aspx which is in the root
folder.

How do I get the relative path to the web site root folder (not the curent
app folder)? A generic one that works no matter how deep the folder is in
the folder heirarchy
 
J

Juan T. Llibre

If it's just a subdirectory, you can use a slash "/"
to signify the root directory of an application.

i.e., / refers to the root directory

If it's an ASP.NET application, you can't make a reference
to the root directory of another application, except by name
in a fully-qualified URL.

i.e., From http://yourserver.com/oneapp
you could refer to http://yourserver.com/anotherapp

but you can't refer to /anotherapp from /oneapp,
unless you use a fully-qualified URL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top