如何将图像存储到文件夹中 [英] how to store image into the folder

查看:76
本文介绍了如何将图像存储到文件夹中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用带有vb.net的asp.net将图像存储到文件夹中以及如何将其路径存储到数据库中

how to store image into the folder and store its path into the databae using asp.net with vb.net

推荐答案

嗨 瓦尔沙,

请尝试关注

Hi Varsha,

Please try following

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


检查
check here[^]
Its in c# converting to vb should not be a problem.


这篇关于如何将图像存储到文件夹中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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