从文件夹中获取图像 [英] Fetch Image from a folder

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

问题描述

我正在使用文件上载控件,该控件将图像上载到文件夹中,并且还将图像路径(Image Url)插入数据库表中.

为了检索存储在文件夹中的图像,在ListView中,我正在使用来自可压片数据库的图像URL,也使用了datapager控件.

问题是,当我单击datapager控件的下一步"按钮时,将显示下一个图像,但是此后,当我单击上一个"按钮时,图像不显示,则显示损坏的图像控件.

我正在使用ListView控件的GroupItemCount ="4"和Datapager控件的pageSize ="12".

如何使用C#在Asp.Net中解决此问题?

I am using a file upload control that upload the Image in a folder and also insert the image path(Image Url) in a database table.

To retrieve Image Which are stored in the folder, in a ListView I am using the Image Url from database tabletable also I use a datapager control.

The problem is when I click Next Button of the datapager control the next images shows but after that when I click Previous Button the Images do not show that is it shows broken Image Control.

I am using GroupItemCount="4" of the ListView Control and pageSize="12" of the Datapager Control.

How Can I overcome from this Problem in Asp.Net with C#?

推荐答案

当图像损坏时.右键单击它并验证图像的路径.
When the image is broken. Right click on it and validate the path of the image.


请参考下面的链接.

http://stackoverflow.com/questions/2953254/cgetting-all-image-files-文件夹内 [ ^ ]

如何使用C#加载/显示图像 [ ^ ]
Hi Please refer the below link.

http://stackoverflow.com/questions/2953254/cgetting-all-image-files-in-folder[^]

http://stackoverflow.com/questions/4647694/c-sharp-how-can-i-read-all-jpeg-files-in-a-directory-using-a-filestream-so-the-f[^]

How to Load/Display images with C#[^]


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

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