What is the purpose of Server.MapPath method in Asp.Net?

In Asp.Net Server.MapPath method maps the specified relative or virtual path to the corresponding physical path on the server. Server.MapPath takes a path as a parameter and returns the physical location on the hard drive. Syntax

Suppose your Text files are located at D:\project\MyProject\Files\TextFiles

If the root project directory is MyProject and the aspx file is located at root then to get the same path use code

//Physical path of TextFiles
string TextFilePath=Server.MapPath("Files/TextFiles");

28 comments:

  1. Hello,

    Article looks Great.


    www.codeintellects.com
    (You can read categories that include Technologies (Sharepoint, .Net, design, SQL server..), Project Management and worklife. Registration is fast and FREE)

    ReplyDelete
  2. hi good information below is good url too

    http://www.interviewqsn.com

    ReplyDelete
  3. very usefull notes and we need more information on this topic please post updated data . thanks for your post.
    Dot net online tutorials


    ReplyDelete
  4. Thank you very much for sharing this information.We provide Dotnet Online Training.for more Dot Net Online Training

    ReplyDelete
  5. some unique interview questions here
    http://www.dotnetqueries.com/

    ReplyDelete
  6. Take a brief information to make your information query great I have read your blog please follow us at :-For all students and individuals eager to learn informatica scenario based questions more about the data warehouse interview questions topic can easily go through the website and face all possible interview questions.

    ReplyDelete
  7. this is really too useful and have more ideas from yours. keep sharing many techniques. eagerly waiting for your new blog and useful information. keep doing more.
    seo company in india

    ReplyDelete
  8. Hi,
    from your post i got technical kind of information for how to attract the customer via the internet and through the internet application how to serve valuable things. it makes easier and very helpful.
    thanks,
    SAT training centre in chennai

    ReplyDelete
  9. Ngày nay, bàn học không chỉ có chức năng để học nữa mà còn như một vật trang trí trong phòng của các bé. Khác hẳn với bé gái, bàn học dành cho bé trai mang vẻ năng động và tinh nghịch. Vì vậy, hãy tham khảo những mẫu bàn học dành cho bé trai dưới đây để tìm ra mẫu phù hợp cho con mình nhé!

    ReplyDelete
  10. Van bướm gang đĩa inox tay quay là thiết bị, được sử dụng sử dụng để đóng mở hoặc điều tiết dòng chảy trong hệ thống đường ống, có đường kính lớn. Loại van này, tương tự như một van bi. Đĩa van được đặt chính giữa đường ống. Đĩa kết nối với thiết bị truyền động bên ngoài ( tay quay ) thông qua một thanh trục bằng kim loại. Khi xoay vô lăng ( tay quay ) thì đĩa van vận động tuy vậy song hoặc vuông góc với dòng chảy tương ứng với việc đóng mở đường ống.

    ReplyDelete
  11. Tan Binh Over 10 years of supplying water materials, our company is now a reliable partner for most water supply systems companies in Hanoi as well as nationwide. With products always available from famous brands like Jaky, Round Start, Uib, Jeoenu YD Valve are pleased to serve you.

    https://forums.vwvortex.com/member.php?3759327-vancongnghiephn
    https://www.darkreading.com/profile.asp?piddl_userid=396420


    https://www.designspiration.com/baogiavancongnghiep/saves/

    https://twinoid.com/user/9959449

    https://gold-forum.kitco.com/member.php?348377-vancongnghiephn

    ReplyDelete
  12. This section I find it very interesting and am exploring. But actually I am a bit difficult in the problem of finding documentation in this. Thank you for sharing to help me navigate my research as well as how to find documentation: Máy ép dầu thực vật Nanifood, Máy ép tinh dầu Nanifood, Máy ép dầu Nanifood, Máy lọc dầu Nanifood, Máy ép dầu, May ep dau, Máy lọc dầu, Máy ép tinh dầu, Máy ép dầu thực vật, Máy ép dầu gia đình, Máy ép dầu kinh doanh, Bán máy ép dầu thực vật, Giá máy ép dầu, Máy ép dầu lạc, Máy ép dầu lạc mini, ....................

    ReplyDelete
  13. With today's modern society, the demanding needs of people are increasing. Not only beauty, eating and playing, but choosing a child's bedroom also requires a lot of factors. Because the bedroom is a place to rest, relax, study and sometimes also play a place for your baby. More: Phòng ngủ trẻ em, Giường tầng bé traiNội thất trẻ em

    ReplyDelete
  14. Good Post. I like your blog. Thanks for Sharing.
    Visit us: dot net training
    Visit us: Dot Net Online Training Hyderabad

    ReplyDelete

Type more interview question answer here