从数据库查看图像 [英] view image from database

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

问题描述

我可以这样查看数据库中的图像吗?


 <   asp:ImageButton     ID   ="   ="span>    runat   =" 服务器"  ImageUrl  " userimage,"〜/images/{0}' > 

解决方案

hi
无论如何,我不知道我是否达到主要目的:
如果要从数据库中读取图像URL,可以从数据库中选择图像URL并像下面的代码一样对其进行绑定:

 <   asp:imagebutton     id   ="   ="span>    runat   =" 服务器"  imageurl    <% #Eval('  imageUrlFieldNameindDataBase')%>"  xmlns:asp   #unknown" /  http://www.dotnetfunda.com/articles/article1084-saving-images-into-the-database-in-aspnet-and-displaying-to-the-gridview.aspx  [ http://codingvilla.com/display-images-using-database-single -article-389.aspx#.UJ9ogWfmGsU  [ http://www.dotnetfunda.com/forums/thread10521- view-image-from-database-to-asp-page.aspx  [<asp:ImageButton ID="userimage" runat="server" ImageUrl='"userimage","~/images/{0}"'/>

hi
i dont know that i get you main purpose or not,anyway:
if you want read your image url from database you can select imageurl from database and bing it like below code:

<asp:imagebutton id="userimage" runat="server" imageurl="<%#Eval('imageUrlFieldNameindDataBase')%>" xmlns:asp="#unknown" />


See form here..
http://www.dotnetfunda.com/articles/article1084-saving-images-into-the-database-in-aspnet-and-displaying-to-the-gridview.aspx[^]
Also see..
http://codingvilla.com/display-images-using-database-single-article-389.aspx#.UJ9ogWfmGsU[^]
http://www.dotnetfunda.com/forums/thread10521-view-image-from-database-to-asp-page.aspx[^]


这篇关于从数据库查看图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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