如何在asp.net中的数据库中水平显示GridView中的图像
问题描述:
请告诉我如何水平显示网格视图中的图像,我的网格视图图像重复记录在单行中,但我想水平显示图像.
Pls tell me how to show images in gridview horizontly, my gridview image repeate in record in single row , but i want to show images horizontly.
答
使用Datalist
代替GridView
.在数据列表中,使用属性RepeatColumns
&RepeatDirection="Horizontal"
,仅此而已.
在这里你
在数据库中的数据列表中显示图像 [动态将图像绑定到DataList控件 [
UseDatalist
instead ofGridView
. In Datalist use the propertiesRepeatColumns
&RepeatDirection="Horizontal"
, that''s all.
Here you go
Display images in DataList from Database[^]
Binding images to a DataList control dynamically[^]