Reputation: 8734
What is server.MapPath() in asp.net. Can any one please explain with example written in Vb.net
Thank you
Upvotes: 2
Views: 2232
Reputation: 55200
For detailed explanation, read Making Sense of ASP.NET Paths by Rick Strahl
Upvotes: 2
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