Solved

Using dropdown and listboxes to enable user selection

Posted on 2014-01-10
4
144 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 25

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 25

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

18 Experts available now in Live!

Get 1:1 Help Now