限制ASP.Net下拉列表中显示的项目数 [英] Limit the number of items displayed in a ASP.Net drop down list

查看:104
本文介绍了限制ASP.Net下拉列表中显示的项目数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想限制下拉列表中显示的项目数.我有一个下拉列表,其中包含大约50个值,并且想要在单击滚动后仅在下拉列表中显示前十个项目,它将显示其余项目.

在此先感谢....

Hi,

I want to limit the number of items displayed in my dropdownlist. I have a drop downlist with around 50 values and want to display first ten items in the drop downlist after clicking the scroll only it will shows the remaining items.

Thanks in Advance....

推荐答案

没有直接的属性可以做到这一点.但是您可以通过设置以下属性来实现,

There is no direct property to do that. But you can do it by setting attributes like below,

DropDownList1.Attributes.Add("Size", "10");



如果有帮助,请将其标记为答案



Mark it as answer if it is helpful


请阅读这篇文章...

它会为您使用全部....

http://blogs.msdn.com/b/rakkimk/archive/2011/05/02/dropdownlist-html-select-vertical-scrollbar-number-of-items.aspx [ http://forums.asp.net/t/1226413.aspx [
Please Read this articals...

it will use full for you....

http://blogs.msdn.com/b/rakkimk/archive/2011/05/02/dropdownlist-html-select-vertical-scrollbar-number-of-items.aspx[^]

http://forums.asp.net/t/1226413.aspx[^]


请参阅:

限制下拉列表中的第. "target =" _ blank"title ="新窗口> ^ ]

http://forums.devshed.com/net-development-87/how-to-limit-the-number-of-items-to-display-in-307319.html [
See this:

Limit the no.of items in dropdown list[^]

http://forums.devshed.com/net-development-87/how-to-limit-the-number-of-items-to-display-in-307319.html[^]


这篇关于限制ASP.Net下拉列表中显示的项目数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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