本文介绍了如何将图像存储到文件夹中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用带有vb.net的asp.net将图像存储到文件夹中以及如何将其路径存储到数据库中
how to store image into the folder and store its path into the databae using asp.net with vb.net
推荐答案
string fileName = Path.GetFileName(this.FileUpload1.PostedFile.FileName);
if (!File.Exists("Images/"+ fileName))
{
//Save Uploaded file at Images folder
FileUpload1.SaveAs(Path.Combine(PDFAttachmentFolderPath, fileName));
//Here is code for save file name in Database
//You can use fileName variable to get uploaded recently image name.
}
谢谢,
Imdadhusen
Thanks,
Imdadhusen
这篇关于如何将图像存储到文件夹中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!