如何在列表框中选择仅两个值? [英] How to make select ONLY TWO VALUE in Listbox?
本文介绍了如何在列表框中选择仅两个值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在asp.net(C#)中创建了一个列表框,我想在网页中只选择两个项目。
怎么做??? ??? br $>
谢谢,
Harshad。
I made a listbox in asp.net (C#) and i want to make select only two items in webpage.
How to do that ???
Thanks,
Harshad.
推荐答案
我自己解决了.....
谢谢你
I have solved by my self.....
Thank u
编写一个javascript代码,将选定的项目保存在容器中。我认为应用队列数据结构是合适的(2节点的队列)。这样您就可以轻松地推入和退出所选项目,如果您只想要删除最旧的项目。
Write a javascript code that keep the selected items on a container. I think applying queue data structure would be appropriate(Queue of 2 node). So that you can push in and out of the selected item easily, in the case that you just want the oldest item to be deseleted.
这篇关于如何在列表框中选择仅两个值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文