Solved

ASP.Net Listbox with multiple choice without using ctrl key

Posted on 2012-03-22
3
943 Views
Last Modified: 2012-03-27
We have a few pages that use listboxes. They are declared as, for example:
<asp:ListBox ID="lst_Res" SelectionMode="Multiple" AutoPostBack="true" Style="font-family: Arial;
font-size: x-small" runat="server" Height="150px" CssClass="NoPrint" />

Open in new window

This works fine as long as we hold down ctrl or use shift. Any computer tech will feel at home with this. But many users don't know that you need to hold ctrl. So I was wondering if it was possible to make a listbox where you don't have to hold ctrl. Clicking on any item will simply select/deselect it. Note that it still has to submit a postback after each change.
0
Comment
Question by:Cluskitt
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
Shaun Kline earned 500 total points
ID: 37755699
The simplest solution is usually the best. Instead of overriding the standard way the list box works, why not add a label near the list box telling the user to hold down the ctrl button to select multiple items?
0
 
LVL 18

Author Comment

by:Cluskitt
ID: 37756185
That was a thought that had already occurred. I was just wondering if we could make the .Net ListBox work like the VB6 used to work. There was no need for ctrl, and I thought it likely that someone would come up with a script that would emulate it. It would be preferable, because some users are reaaaaaaally computer incompetent. Even holding ctrl could possibly be too complicated for them, especially having to wait for postback after each click.
0
 
LVL 18

Author Closing Comment

by:Cluskitt
ID: 37770260
Well, no other solution was presented, so it seems that I'll have to do just that.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now