且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在网格视图中显示图像?

更新时间:2023-01-24 11:32:02

解决方案是......



存储图像'在数据库列中的网站中的完整路径使用例如〜/ imageFolder / fileName.jpg





1.采取grideview控制

2.选择你的数据源和数据表> gridview顶部的箭头

3.点击编辑栏链接。

4.将ImageField从可用字段带到选定字段。

5.将dataImageUrlField的属性设置为数据库中存储的图片文件的路径。



图像将显示在gridview表中。你也可以排序和选择gridview的文件。
solution is....

store image''s full path use in website in a database column e.g. ~/imageFolder/fileName.jpg

than
1. take a grideview control
2. choose your data source and data table with > arrow at top of gridview
3. than click on edit column link.
4. take ImageField from available field to selected field.
5. set its property of dataImageUrlField as path of the file of picture stored in your database.

Image will show in gridview table. you can also sort and select the files of gridview.


在GridView中显示数据库中的图像 [ ^ ]

显示/存储和检索图像数据从数据库到Gridview,以及鼠标悬停 [ ^ ]

在ASP.NET GridView控件中显示图库[ ^ ]
Displaying Images from a Database in a GridView[^]
Display/Store and Retrieve Image Data from Database to Gridview, and also on Mouse Over[^]
Display image gallery in ASP.NET GridView Control[^]