如何在C#中获取服务器上本地文件的http url路径

问题描述:

我正在开发一个Web应用程序,其中用户正在上载csv文件中的所有物料库存,但是我不知道如何获取本地计算机文件路径,

我该怎么用

请帮助我

在此先感谢

i am developing a web application, in which user is uploading all material stock in csv file, but i dont know how to get the local machine file path,

what should i use for that

please help me

thanks in advance

请了解有关在ASP.NET中上传文件的信息:
http://msdn.microsoft.com/en-us/library/aa479405.aspx [ ^ ].

这是一篇简单的分步文章:
http://asp.net-tutorials.com/controls/file-upload-control/ [ ^ ].

这些CodeProject文章可能会有用:
使用ASP.NET上传文件 [带有进度条的ASP.NET文件上传 [ ^ ].

—SA
Please learn about file uploading in ASP.NET:
http://msdn.microsoft.com/en-us/library/aa479405.aspx[^].

This is a simple step-by-step article:
http://asp.net-tutorials.com/controls/file-upload-control/[^].

These CodeProject articles could be useful:
File Upload with ASP.NET[^],
ASP.NET File Upload with Progress Bar[^].

—SA


您可以使用Server.MapPath来获取本地文件.
You can use Server.MapPath to get the local file.