具有过滤功能的 ASP.Net 图片库控件

发布于 2024-08-28 13:03:13 字数 342 浏览 2 评论 0原文

我正在编写一个 ASP.Net 应用程序,它需要显示大量缩略图,最好以分页格式显示。这些缩略图将存储在服务器的硬盘上,但其文件名将列在 SQL Server 数据库中。我想要做的是能够根据数据库中的标准过滤显示的图像。

我查看了 NotesForGallery 控件,我非常喜欢它,但它似乎没有这样做的方法。 ——如果我错了,请指正。

是否有任何其他图像库类型控件(最好是免费的)可以满足我的需要?我希望有人可以推荐一种控制或解决方案,为我指明正确的方向。

提前致谢。

I'm writing an ASP.Net application which needs to display a large number of thumbnails, preferably in a paginated format. These thumbnails will be stored on the server's hard disk, but will have their filenames listed in a SQL Server database. What I want to do is to be able to filter the images being displayed based on criteria within the database.

I've looked at the NotesForGallery control, which I really like, but it doesn't seem to have a way to do that. --if I'm wrong, please correct me.

Are there any other image gallery type controls, preferably free, that can do what I need? I'm hoping someone can recommend a control or solution that will point me in the right direction.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

横笛休吹塞上声 2024-09-04 13:03:13

就像 K2so 所说的那样,您是否只考虑过将数据绑定到简单的中继器或数据网格?由于您的图像名称和其他属性都在数据库中,因此您可以运行查询并返回图像列表。

示例(粗略代码,抱歉)

<asp:repeater id="yourImages" runat="server">
    <itemTemplate>
        <img src='~/Images/Files/<% Bind("ImageFileName")%>' />
    </ItemTemplate>
</asp:repeater>

使用分页网格视图也非常相似。

编辑:我尝试将此作为评论发布,但链接效果不佳。这是 ASP.NET listView 的演示,其中图像位于网格和分页中。 Matt Berseth 演示网站

Like K2so was saying, have you looked at just databinding to a simple repeater or datagrid? Since your image names and other properties are in the database, you could run your query and spit back out a list of images.

Example (rough code, sorry)

<asp:repeater id="yourImages" runat="server">
    <itemTemplate>
        <img src='~/Images/Files/<% Bind("ImageFileName")%>' />
    </ItemTemplate>
</asp:repeater>

Using a paginated grid view would be very similar as well.

EDIT: I tried to post this as a comment, but the link wouldn't work very well. Here is a demo of asp.net listView with images in a grid and paged. Matt Berseth Demo Site

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文