在ASP.NET中填充图像的下拉列表? [英] Drop-Down List Filled with Images in ASP.NET?

查看:255
本文介绍了在ASP.NET中填充图像的下拉列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何制作充满图像项目的下拉列表?我想要能够看到列表中包含文本标题的图像列表,可以单独选择一个,并且文本标题显示在列表顶部的选择框中。有没有人知道如何实现?

How do I make a drop-down list that is filled with image items? I want to be able to see a list of images in the list with text titles, be able to select one exclusively, and have the text title appear in the selection box on top of the list. Does anyone know how this can be accomplished?

推荐答案

最简单的方法是使用第三方库,例如Telerik的ASP.NET AJAX库(通常称为Rad Controls)。

The most straightforward way to do this is to use a 3rd party library such as Telerik's ASP.NET AJAX library (commonly referred to as Rad Controls).

http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultcs.aspx

我和Telerik有好运气。关于RadComboBox(其功能齐全的ASP.NET下拉列表)的一件好事是,如果您愿意,它可以覆盖列表中每个项目的渲染。通过覆盖每个项目的渲染,您可以将任何类型的HTML放入下拉列表(包括图像,表等)中。所以它是非常强大的。

I have had good luck with Telerik. One nice thing about the RadComboBox (their full-featured drop down list for ASP.NET) is that it allows you to override the rendering of every item in the list if you wish. By overriding the rendering of each item, you may put any kind of HTML into the drop down list (including images, tables, etc). So it is pretty powerful.

下面是它是商业产品,有一点学习曲线。此外,根据您的要求,Telerik控件可能有点沉重。

The down-side is that it is a commercial product and there is a bit of a learning curve. Also, Telerik controls can be a little heavy depending upon your requirements.

我没有具有此级别功能的其他第三方库的经验,因此可能会其他解决方案。

I don't have experience with other 3rd party libraries with this level of functionality, so there may be other solutions out there.

这篇关于在ASP.NET中填充图像的下拉列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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