如何使用文件路径从SQL db中恢复映像 [英] How to Retrive the Image from SQL db by using file path

查看:104
本文介绍了如何使用文件路径从SQL db中恢复映像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我正在进行stroing并从数据库中恢复图像并在gridview控件中显示

请参考以下URL



使用存储在ASP.NET数据库中的文件路径来检索图像



现在我的问题是没有将图像输入来自数据库的girdview。任何人都可以帮助我的朋友。





问候

Krishna

hi friends,

iam doing stroing and retriveing the images from database and display in th gridview control
please refer the following URL

RETRIEVE IMAGES USING A FILE PATH STORED IN DATABASE IN ASP.NET

Now my Problem is not getting the image into girdview from database.could you any one can help me friends.


Regards
Krishna

推荐答案

请参阅以下文章:

http://www.aspdotnet-suresh.com/2011/03/how-to-save-images-into-folder-and.html [ ^ ]
Please refer the following article :
http://www.aspdotnet-suresh.com/2011/03/how-to-save-images-into-folder-and.html[^]


< asp:TemplateField HeaderText =客户形象>

< ItemTemplate>

< asp:图片ID =Image1ImageUrl ='<%#Eval(client_image_url)%>'宽度=100

高度=100runat =server/>

< / ItemTemplate>

< / asp:TemplateField>





这里client_image_url是包含图像路径的数据库字段。
<asp:TemplateField HeaderText="Client Image">
<ItemTemplate>
<asp:Image ID="Image1" ImageUrl='<%#Eval("client_image_url") %>' Width="100"
Height="100" runat="server" />
</ItemTemplate>
</asp:TemplateField>


Here client_image_url is your database field which contains image path.


这篇关于如何使用文件路径从SQL db中恢复映像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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