Q: Get absolute path to a file.

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 [ Mo, 07 April 2008 17:34 ] [ ID #1936982 ]

Re: Get absolute path to a file.

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

George.

"Martin Arvidsson, Visual Systems AB" <martin.arvidsson [at] vsab.net> wrote in
message news:OYUXmVMmIHA.1280 [at] TK2MSFTNGP05.phx.gbl...
> 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 [ Mo, 07 April 2008 17:47 ] [ ID #1936983 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » Q: Get absolute path to a file.

Vorheriges Thema: How to send parameters from AutoCompleteExtender to WebService ?
Nächstes Thema: Handle # sign in url/querystring