本文介绍了问题与来自asp.net数据库中的显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将路径和名称文件保存在databse中
并想在中继器中显示
但是
图片未显示
请帮助
tnx


i save path and name file in databse
and want to display in repeater
but
the picture don''t displayed
please help
tnx


<asp:Repeater ID="Repeater1" runat="server">
   <ItemTemplate>
     <a href="<%#Eval("filenameOrginal") %>">
     <img src="<%#Eval("flienameThumb") %>" />   </a>
   </ItemTemplate>
</asp:Repeater>







dal db = new dal();
DataTable dt = new DataTable();
dt = db.run_dr("select * from picgallery where show='true' ");
Repeater1.DataSource = dt;
Repeater1.DataBind();



我将文件的路径和名称保存到数据库中,如下所示:
gallerypic/orginal/12.jpg

我尝试这样做:
〜/gallerypic/orginal/12.jpg
或:
../gallerypic/orginal/12.jpg

在浏览器的源代码中:



i save path and name of file to database like this:
gallerypic/orginal/12.jpg

i try this to:
~/gallerypic/orginal/12.jpg
or:
../gallerypic/orginal/12.jpg

in source code of browser:

<a href="gallerypic/orginal/12.jpg">
<img src="gallerypic/thumb/12.jpg" />





<a href="~/gallerypic/orginal/12.jpg">
<img src="~/gallerypic/thumb/12.jpg" />

推荐答案




这篇关于问题与来自asp.net数据库中的显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 12:22
查看更多