Click here to Skip to main content
15,885,537 members
Please Sign up or sign in to vote.
3.25/5 (3 votes)
See more:
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.
Posted
Comments
J.Karthick 7-Mar-13 1:56am    
You need a JavaScript code to loop through the listbox items and find No.of selection made yet and let user to select next item.
harshadcse 7-Mar-13 2:35am    
so....where can i find javascript.???
Marco Bertschi 7-Mar-13 3:41am    
Here:
http://forums.asp.net/t/1296996.aspx/1

cheers,
Marco Bertschi
harshadcse 7-Mar-13 7:02am    
NO,.... :(

I have solved by my self.....

Thank u
 
Share this answer
 
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.
 
Share this answer
 
Comments
harshadcse 7-Mar-13 23:25pm    
hmm.... can you provide that javascript ??????

PLZZZZZZZZZZ

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900