I’m usting an asp:ListBox and I understand that to deselect items the user needs to hold down control while clicking on a selected item. Is there a way to make it that clicking on a selected item will deselect it without holding down control?
I’m usting an asp:ListBox and I understand that to deselect items the user needs
Share
You can, but not in ASP.Net. You need to change the client-side HTML, meaning you need to code it using Javascript, to change the default behaviour or a select box. Something like:
But… I really recomend against it. To acheive what you want, your “MyHandle” function would have to emulate everything that normal forms does: selecting, de-selecting, range selecting (using shift), single selection without affecting others (control key), etc.
Its easier to switch to checkboxes, as Jakob suggested.