Hi All,
Please let me know if there is way in which i we can make multiple selections from a drop down list.
The requirement is as follows:
I have a drop down list, whose entries are to be populated from a table in the database. The user should be able to select multiple items from the drop down list(Maximum 3), and on pressing the submit button, a single column in a row, in the table should be populated with all the selected values.
Kindly help.
Thank You.
5 1692
Hi All,
Please let me know if there is way in which i we can make multiple selections from a drop down list.
The requirement is as follows:
I have a drop down list, whose entries are to be populated from a table in the database. The user should be able to select multiple items from the drop down list(Maximum 3), and on pressing the submit button, a single column in a row, in the table should be populated with all the selected values.
Kindly help.
Thank You.
why are you using dropdown??? use listbox instead......
ya its better to use listbox for selecting more than one items
why are you using dropdown??? use listbox instead......
ok ....... even if i use list box, how do i make multiple selected entries into the database.
ehat i mean is suppose a user selects 3 items from the list, how do i make sure that all the 3 elements are inserted,(separated by a comma) into the same column in a row of the table ????
could you please send me the code or query for that???
ya its better to use listbox for selecting more than one items
ok ....... even if i use list box, how do i make multiple selected entries into the database.
ehat i mean is suppose a user selects 3 items from the list, how do i make sure that all the 3 elements are inserted,(separated by a comma) into the same column in a row of the table ????
could you please send me the code or query for that???
hi friend,
try with this one
string AllItems="";
foreach (ListItem item in ListBox1.Items)
{
if (ListBox1.Items.FindByText(item.Text).Selected == true)
{
if(AllItems=="")
{
AllItems=item.Text;
}
else
{
AllItems=AllItems+","+item.Text;
}
}
}
now you got the string as u need. store it in database
Prabu
ok ....... even if i use list box, how do i make multiple selected entries into the database.
ehat i mean is suppose a user selects 3 items from the list, how do i make sure that all the 3 elements are inserted,(separated by a comma) into the same column in a row of the table ????
could you please send me the code or query for that???
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Ringwraith |
last post by:
Hi!
Have anyone ever tried to modify the Gene Cash's Tkinter tree widget
(available from http://home.cfl.rr.com/genecash/) so it supports
multiple items selection ( selection of multiple files...
|
by: Jas |
last post by:
I want an ASP page with a dropdown and a simple button. Every time the user
chooses an item from the dropdown and clicks on the button i want that value
written below in list and allow user to...
|
by: Felix Natter |
last post by:
hi,
I have a php-Script which gets passed a Boat-ID and this is used to
mark an element in a <select> as the default:
<select name="boote" multiple="multiple" size="5">
<option...
|
by: Disco-181 |
last post by:
Hi,
I have a script which isn't working in Mozilla based browser for some
reason. I'm trying to run two functions from the body onload tag and
it simply isn't happening.
I have a cascading...
|
by: Kay |
last post by:
Hello,
I have two list boxes on my form, one initially displays with items and the
other displays blank, by clicking a button, it is possible to move items
from one box to another and vice a...
|
by: Peter |
last post by:
Hello!
Please, could anyone tell, is it possible to set multiple items to be
selected in list control in the code? For example when the web form is loaded
three items of 5 are selected in list...
|
by: ads |
last post by:
hi,
after binding the dropdownlist to a datasource, ive experience this error
"Cannot have multiple items selected in a dropdownlist" after using the code:...
|
by: jjuan |
last post by:
I have a multiple dropdown which have multiple selection.
If I select multiple value on my multiple dropdown list and submit it,how
can i write it on the tblotherlang
sample code
<select...
|
by: permander kumar |
last post by:
hi
plz help me,
i have a code in which two multiple selection dropdown list. in first list if I am select single value the data are fetch in second table on button click. but the problem is in...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |