Q: Get absolute path to a file.

Discussion in 'ASP .Net' started by Martin Arvidsson, Visual Systems AB, Apr 7, 2008.

  1. Hi!

    I have a web application and in that web application there are several
    crystal report files.

    The tree looks something like this

    /
    Orders
    Reports
    Invoice
    Reports

    Now what i am wondering is i want to open a reportfile from orders/reports
    or the Invoice/reports
    how can i get the fysical path to the "web" path example /orders/reports is
    in C:\InetPub\MyWeb\Orders\Reports

    The thing is depending on customer installation it may be a different
    location
    and i want to avoid storing the path in an xml file.

    Or is there another smart way to get the filename of the reportfile?



    Regards
    Martin
     
    Martin Arvidsson, Visual Systems AB, Apr 7, 2008
    #1
    1. Advertising

  2. Re: Get absolute path to a file.

    Server.MapPapth....
    It converts virtual path to physical..

    George.

    "Martin Arvidsson, Visual Systems AB" <> wrote in
    message news:...
    > Hi!
    >
    > I have a web application and in that web application there are several
    > crystal report files.
    >
    > The tree looks something like this
    >
    > /
    > Orders
    > Reports
    > Invoice
    > Reports
    >
    > Now what i am wondering is i want to open a reportfile from orders/reports
    > or the Invoice/reports
    > how can i get the fysical path to the "web" path example /orders/reports
    > is in C:\InetPub\MyWeb\Orders\Reports
    >
    > The thing is depending on customer installation it may be a different
    > location
    > and i want to avoid storing the path in an xml file.
    >
    > Or is there another smart way to get the filename of the reportfile?
    >
    >
    >
    > Regards
    > Martin
    >
    >
    >
     
    George Ter-Saakov, Apr 7, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    3
    Views:
    19,728
    Sudsy
    Jul 8, 2004
  2. Replies:
    10
    Views:
    3,836
  3. Thomas Guettler
    Replies:
    3
    Views:
    793
    Andrei
    Oct 27, 2003
  4. Nigel Wilkinson
    Replies:
    2
    Views:
    422
    Nigel Wilkinson
    Jul 25, 2005
  5. James Byrne
    Replies:
    3
    Views:
    627
    James Byrne
    Sep 14, 2010
Loading...

Share This Page