如何在目录文件夹中检索/显示图像 [英] How to Retrieve/Display Image in a Directory Folder

查看:91
本文介绍了如何在目录文件夹中检索/显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨专家



任何人都可以帮助我,我如何从目录文件夹中检索图像,当我从我的数据库中选择记录时,所选数据和图像也将从记录列表中显示。









谢谢最好的问候,

Hi Experts

Can anyone help me, how can i retrieve image from a directory folder that when i select records from my database the selected data & image will also display from the list of records.




Thank you & Best regards,

推荐答案

要从文件夹/目录中获取文件列表,您可以使用

Directory.GetFiles方法



但是我相信你必须将图像文件路径/图像名称存储在数据库中的某个位置。如果是真的那么你可以使用image元素在页面/表单中显示它们。你需要提供与图像元素有关的图像路径作为源。



很高兴知道你有什么尝试,以便我们建议你一个更简单,更干净的建议。



希望,它有帮助:)
To get the list of files from a folder/directory you can use
Directory.GetFiles Method

But I believe you must have stored the image file paths/image names somewhere in the database. If it's true then you can show them in the page/form using image element. you need to provide the image path bounded to the image element as source.

It would be good to know, what have you tried si far so that we can suggest you a more easier and clean suggestion.

Hope, it helps :)


这篇关于如何在目录文件夹中检索/显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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