如何更改他的文件路径 [英] how to change he file path

查看:74
本文介绍了如何更改他的文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我正在使用fileupload标签上传文件.它是什么将文件保存到以下目录:C:\ Program Files \ Common Files \ Microsoft Shared \ DevServer \ 10.0 \
有人可以告诉我如何更改此路径并将上传文件保存到其他目录中.

解决方案

您对此具有完全的控制权.如果要将文件保存到其他路径,请告诉它

 fileUpload.PostedFile.SaveAs("  



只要确保该文件夹具有权限


hi i am using fileupload tag to upload the file. what is does it saves the file into the follwoing directory: C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\
can somebody tells me how to change this path and save the upload file into some other directory.

解决方案

You have complete control of this. If you want to the file saved to a different path, then tell it

fileUpload.PostedFile.SaveAs("c:\my path\" + fileUpload.FileName);



Just make sure the folder has permissions


这篇关于如何更改他的文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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