Server.MapPath() in Asp.net
What is the role of using Server.MapPath() function in uploading a file?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
SenthilkumarRank #387 · 6.5K reputationPosted May 24, 2012, 9:53 PM EDT
Server.MapPath used to map the server path where the application hosted. It will gives you the path where the files can be stored.
Jignesh TrivediRank #16 · 50.3K reputationPosted May 24, 2012, 10:14 PM EDT
The MapPath method maps a specified path to a physical path.
In your application, you might need to determine the path of a file or other resource on the server. For example, if your Web project reads or writes a text file programmatically, you must supply the file's complete physical path to the methods used for reading and writing.
please refer
http://msdn.microsoft.com/en-us/library/ms524632%28v=vs.90%29.aspx
hope this will help u.
Satyapriya NayakRank #47 · 31.5K reputationPosted May 24, 2012, 11:24 PM EDT
Please refer the below link
http://www.c-sharpcorner.com/uploadfile/abhikumarvatsa/server-mappath-in-Asp-Net/default.aspx
Thanks