Solved

Using dropdown and listboxes to enable user selection

Posted on 2014-01-10
4
150 Views
Last Modified: 2014-01-13
Please see the attached file.
The program should allow users to select one or more options from the dropdown boxes.  The selected option gets put into the listbox.  When the user presses apply filter the items in the list box get sent to the stored procedure.
To make it work I use textboxes and hidden fields with javascript.
I want to make the textboxes eg txtfilenamecode invisible or at least disabled.  However this causes the program to fail.  
Any suggestions?
FileCollection.txt
0
Comment
Question by:AlHal2
  • 2
  • 2
4 Comments
 
LVL 26

Expert Comment

by:Shaun Kline
ID: 39771002
What you are describing fits more inline when using the CheckboxList control. Is there a design reason that you are using drop-down controls and list boxes to allow for multiple selections?

You can make textboxes invisible the using CSS which will not affect postback that you comment about in the attachment. To do this, add either a CssClass with a "display: none;" or add directly to your control a style property.
0
 

Author Comment

by:AlHal2
ID: 39776002
How would you use a checkboxlist if a dropdownbox could have hundreds of items?  I found it clogged up the web page, so was seeking an alternative.
0
 
LVL 26

Accepted Solution

by:
Shaun Kline earned 250 total points
ID: 39776447
You can enclose your checkboxlist control in a DIV and apply CSS to the DIV to limit its size. The CSS looks something like this:
.checkBoxList {
  max-height:100px;
  height:auto !important;
  height:100px;
}

Open in new window

0
 

Author Closing Comment

by:AlHal2
ID: 39776560
thanks.
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

740 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