get Server path

  • Thread starter Thread starter Grey
  • Start date Start date
G

Grey

How to get the server application path in ASP.NET. Suppose I create a application called "TestASP", what function in ASP.NET I can use to retrieve the "C:\Inetpub\wwwroot\TestASP\".

Milliion Thanks..
 
hi,
just single line of code:
string str=Server.MapPath(".");

Response.Write(str);

bye

amit agarwal

india...

How to get the server application path in ASP.NET. Suppose I create a application called "TestASP", what function in ASP.NET I can use to retrieve the "C:\Inetpub\wwwroot\TestASP\".

Milliion Thanks..
 
Hi Grey,
Check out
[http://www.freevbcode.com/ShowCode.Asp?ID=5615] . You need
to check for APPL_PHYSICAL_PATH.
Hope that helps
R. Pooran Prasad
Itreya Technologies Pvt Ltd.,
Mail: pooran.prasad_at_itreya.com
Phone(Off) : +91(80)5200179 Extn: 51
Mobile: +91 98860 29578
-----Original Message-----
How to get the server application path in ASP.NET. Suppose
I create a application called "TestASP", what function in
ASP.NET I can use to retrieve the
"C:\Inetpub\wwwroot\TestASP\".
 
Back
Top