Mihir
Mihir

Reputation: 8734

what is server.mappath(".") in asp.net

What is server.MapPath() in asp.net. Can any one please explain with example written in Vb.net

Thank you

Upvotes: 2

Views: 2232

Answers (2)

codeandcloud
codeandcloud

Reputation: 55200

For detailed explanation, read Making Sense of ASP.NET Paths by Rick Strahl

Upvotes: 2

Darin Dimitrov
Darin Dimitrov

Reputation: 1038710

Server.MapPath(".") represents the current request absolute path, so if Server.MapPath("~") equals c:\wwwroot which represents the site root and the current request is /foo then Server.MapPath(".") will return c:\wwwroot\foo.

Upvotes: 4

Related Questions