将文件上传到asp.net中的特定文件夹 [英] Upload files to particular folder in asp.net
本文介绍了将文件上传到asp.net中的特定文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将文件上传到asp.net中的特定文件夹.
注意:该文件夹位于我的网站文件夹中,并且如果我通过复制网站在其他系统中运行该程序,则当我单击上传文件时,必须在同一文件夹中上传
How to upload files into a particular folder in asp.net.
Note:That folder present inside my website folder and if i run the program in other system by copying the website,when i click upload files must upload in the same folder
推荐答案
看看这些链接:
在ASP.NET 2.0中上传文件 [在ASP.NET 2.0中上传文件 [更多 [正在复制网站并且必须上传内容... ",这是关于一旦上传就可以处理的配置.
Have a look at these links:
Uploading Files in ASP.NET 2.0[^]
File Uploading in ASP.NET 2.0[^]
If needed, look here for more[^].
About "copying website and must upload thing...", that is about configuration that you can handle once you are able to upload.
Hai请使用以下内容tocde上传您的文件
添加文件上传器和按钮,并将代码写入按钮单击事件
if(FileUpload1.hasFile){
FileUpload1.SaveAs(@"C:\ Documents and Settings \ APU \ My Documents \ Visual Studio 2008 \ WebSites \ ASP.NET \ notice \中的文件" + FileUpload1.FileName);
}
您可以设置更改的名称,而不是FileUpload1.FileName..
Hai use the following tocde to upload your file
add a file uploader and a button and write the code into the button click event
if(FileUpload1.hasFile){
FileUpload1.SaveAs(@"C:\Documents and Settings\APU\My Documents\Visual Studio 2008\WebSites\File In ASP.NET\notice\" + FileUpload1.FileName);
}
you can set your changed name rather than FileUpload1.FileName..
这可以用作漂亮的交互式UI的基础
Silverlight文件管理器 [ Web文件管理器 [ DevExpress ASP.NET文件管理器 [
This may be used as the foundation of a nice interactive UI
Silverlight File Manager[^]
There is also this:
Web File Manager[^]
or DevExpress ASP.NET File Manager [^] in case you don''t actually want to roll your own :)
Regards
Espen Harlinn
这篇关于将文件上传到asp.net中的特定文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文