What does Server.MapPath do?

Recommended Answers

All 3 Replies

What does Server.MapPath do?

server.mappath() is one function, and it give the path the file pass in the parameter in the function.

Regards,

server.mappath will map a virtual path to the actual path on the webserver.

E.g. server.mappath("/directory/file.png")

this would yield a result like: -

"c:\inetpub\wwwroot\webfolder\directory\file.png"

Server.MapPath actually brings out the whole path value from where the particular file has come....e.g d:/abc/abc.doc
it is mainly used in fileupload tool...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.