国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
asp.net 上傳/下載/新建文件夾
上傳代碼:
string fullname = FileUpload1.FileName.ToString();
            string url = FileUpload1.PostedFile.FileName.ToString();
            string typ = FileUpload1.PostedFile.ContentType.ToString();
            string typ2 = fullname.Substring(fullname.LastIndexOf(".")+ 1);
            int size = FileUpload1.PostedFile.ContentLength;
            string upload_file = Server.MapPath("./upload/") + Resumeid + "/" + fullname;
 try
            {
                FileUpload1.PostedFile.SaveAs(upload_file);
            }
            catch
            {
                //error message
            }
下載代碼:
if (File.Exists(filePath))
            {
                FileInfo file = new FileInfo(filePath);
                Response.ContentEncoding = System.Text.Encoding.GetEncoding("UTF-8"); //解決中文亂碼
                Response.AddHeader("Content-Disposition", "attachment; filename=" + filename.ToString().Trim()); //解決中文文件名亂碼   
                Response.AddHeader("Content-length", file.Length.ToString());
                Response.ContentType = "appliction/octet-stream";
                Response.WriteFile(file.FullName);
                Response.End();
            }
創(chuàng)建新文件夾代碼:
string CreatePath = Server.MapPath("./upload/") + folder_name.toString();
            if (!Directory.Exists(CreatePath))
            {
                Directory.CreateDirectory(CreatePath);
            }
本站僅提供存儲服務,所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
ASP.NET中文件上傳下載方法集合
ASP.NET上傳文件的幾種方法
FileUpload文件上傳代碼
編程小總結(jié)
ASP.NET2.0文件上傳以及圖片處理總結(jié)篇
文件和流(使用流讀寫文件)
更多類似文章 >>
生活服務
分享 收藏 導長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服