在GridView中显示图像 [英] Display image in gridview

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

问题描述

我将图像路径保存在数据库中,并在gridview中检索图像.我正在从数据库中获取除图像Plz帮助之外的所有其他条目...
这是代码..

< asp:image id ="Image1" runat ="server" imageurl =<%#Eval(" url)%>">

hi I m saving image path in data base and retrieving the image in gridview. Im getting all other enteries from database except the image Plz help...
Here is the code..

<asp:image id="Image1" runat="server" imageurl="<%# Eval("url") %>">

推荐答案

只需确保保存在数据库中的URL是适当的.
并且Eval表达式中的列名与ur数据源中的列名相同.
并且图像文件imagefile确实存在于数据库路径中指定的路径上.
Just make sure that the URL that is being saved in your database is APPROPRIATE.
and the column name in the Eval Expression is identical as the one in ur datasource.
and also the image file imagefile does exist on the path specified in the database path.


检查渲染的html并验证控件是否正确渲染.请张贴呈现的html部分,以为您提供更多帮助.
Check the rendered html and verify that your control is rendered correctly. Pls post the rendered html part for assisting you more.


thanx suyogm

我的文件夹名称错误
thanx suyogm

My folder name was wrong


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

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