Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Using dropdown and listboxes to enable user selection

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

792 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