如何在C#中获取服务器上本地文件的http url路径 [英] how to get http url path of local file on server in c#

查看:1555
本文介绍了如何在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.


这篇关于如何在C#中获取服务器上本地文件的http url路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆