【发布时间】:2011-10-06 20:21:51
【问题描述】:
我正在尝试将 Galleria 与 asp.net ListView 一起使用,该列表视图在上传这些图像后从数据库中获取图像源。以下是我的列表视图:
<div id="photoAlbumDiv" class="photoAlbumDiv">
<asp:ListView ID="ListView1" runat="server" DataKeyNames="id" >
<AlternatingItemTemplate>
<td runat="server" style="">
</td>
</AlternatingItemTemplate>
<EditItemTemplate>
<td runat="server" style="">
</td>
</EditItemTemplate>
<EmptyDataTemplate>
<table style="">
<tr>
<td>
No data was returned.</td>
</tr>
</table>
</EmptyDataTemplate>
<InsertItemTemplate>
<td runat="server" style="">
</td>
</InsertItemTemplate>
<ItemTemplate>
<td runat="server" style="">
<img id="photoAlbumPhotos" src='<%# Eval("img") %>' alt="Image Not Found" class="photoAlbumPhotos" />
</td>
</ItemTemplate>
<LayoutTemplate>
<table runat="server" border="0" style="">
<tr ID="itemPlaceholderContainer" runat="server">
<td ID="itemPlaceholder" runat="server">
</td>
</tr>
</table>
<div style="">
</div>
</LayoutTemplate>
<SelectedItemTemplate>
<td runat="server" style="">
id:
<asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>' />
<br />
img:
<asp:Label ID="imgLabel" runat="server" Text='<%# Eval("img") %>' />
<br />
</td>
</SelectedItemTemplate>
</asp:ListView>
</div>
这是我的 jquery:
<script type="text/javascript">
Galleria.loadTheme('Scripts/themes/classic/galleria.classic.min.js');
$("#photoAlbumDiv").galleria({
height: 1000,
width: 1000
});
</script>
可以吗,谢谢
【问题讨论】:
-
艾莉森:你怎样才能得到每张图片的描述?谢谢
-
@shazia - 你应该在这里找到答案galleria.io/docs/references/data
标签: jquery asp.net image listview