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

Discussion in 'ASP .Net' started by John Dalberg, Apr 15, 2005.

  1. John Dalberg

    John Dalberg Guest

    I have an 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

    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
    John Dalberg, Apr 15, 2005
    1. Advertisements

  2. 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
    you could refer to

    but you can't refer to /anotherapp from /oneapp,
    unless you use a fully-qualified URL
    Juan T. Llibre, Apr 15, 2005
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.