将图像控件绑定到数据库 [英] Bind Image control to Database
本文介绍了将图像控件绑定到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好!
当我使用此
将图像控件绑定到数据库时
代码,
Hello!
When I bind my Image Control to the Database with this
code,
(ImageUrl='<%# Eval("teachImage", "~/admin/teacherPic//{0}") %>'@"~\admin\teacherPic\\")
它不会显示数据库中的所有图像.您能告诉我这个错误在哪里吗?
It does not show all images that are in the database. Can you please tell me where this error is?
推荐答案
尝试这个
try this
ImageUrl=''<%# String.Concat(@"~\Uploads\PlaceImages\SmallImage\",Eval("placetovisitimages_image")) %>''
// Where @"~\Uploads\PlaceImages\SmallImage\" this is your Image folder Path
// and Database Image Name :- Eval("placetovisitimages_image")
这篇关于将图像控件绑定到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文