473,738 Members | 11,192 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to process a CheckboxList multiple selection.


Hello,
Can someone guide me in how i may process a multiple selection on a
databound checkboxlist?
The checkboxlist is bound to a table of product category. The product
category id is an FK in the product list.

When multiple selction are made on the checkBoxList, how may i best process
the selection to retrive the corresponding products?
I have ides how to accomplish this, but i think there should be more
intuitive ways to do it.

Any comments will be highly appreciated.

Many thanks
JB
Nov 16 '05 #1
2 7273
Just loop through the Items collection and check if the ListItem's
Selected property returns true.

----
- Wilco Bauwer
Blog & Custom Controls @ http://wilcoding.xs4all.nl

Nov 16 '05 #2
> ----
- Wilco Bauwer
Blog & Custom Controls @ http://wilcoding.xs4all.nl


I was mostly thinking about how to query the database based on all these
reults.
I know how to retrieve the list of selected items and there ids.
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6908
by: Mats | last post by:
Hi I am working on a webapplication using Asp.net with C#. I have Datagrid that have 3 colums two of them are text but the last one is a CheckBoxList. I have manage to set data to the CheckBoxList but I haven't found a way to select those checkbox that I will. I read data from a database and will make a table with two text columns and one column filled with several
0
2185
by: Tony | last post by:
I have a repeater that renders multiple checkboxlists that are set up with a repeat direction of horizontal. Because the labels for each checkbox are different in length only the individual checkboxlist items are aligned nicely, however when looking at the multiple checkboxlists, it'd be nice to have everything align nicely. Is there a way that I can set the with of the columns for the checkboxlist? I tried adding an attribute such as,,...
0
1502
by: wjer | last post by:
I am trying to do two things for a test app: 1) Populate a CheckboxList webcontrol by loading a list of subject names (for the DataTextField) and subject codes (for the DataValueField). 2) Respond to user selection by inserting their boolean values based on checked vs. unchecked boxes. I have a SQL Server table with a lot of columns of data type bit. All of the columns are named after different subject codes (such as HSmath, HSast, etc.)...
3
3775
by: Sully | last post by:
Hi, I am having a small problem generating an e-mail via an online form. I am creating an e-mail using the MailMessage command and I know that you have to do something special to render the values Checked with a CheckBoxList, but I don't know what to do or how to do it. If anyone could give me an example or send me to a link I would appreciate it. Thanks in advance.
0
2743
by: joebob8000 | last post by:
This seems like a simple task, but my 6 year old roots in classic ASP must be causing me trouble with my current problem. I am looking to provide a search for users in which they can select multiple categores (check boxes) and view only the results in those categories in a gridView control. My goal is to do so for movies, so an example would be if the user checks comedy and childrens then they would only get childrens comedies and the...
0
1189
by: riteshraha | last post by:
I cant retrieve selected item from checkboxlist in asp.net project. when i submit multiple item from checkboxlist it works fine. but when i am trying to edit this items then checkboxlist does not select the previous values that i have selected.It only selects one item. my code which i am using for edit is following: Dim _drArticle As SqlDataReader _drArticle = SqlHelper.ExecuteReader(ConfigurationSettings.AppS ettings("ConnectionString"), _...
1
2007
by: Zak | last post by:
Hello, I need some help trying to grab the data selected from a checkboxlist. The checklist is acting like a menu. The first selection is accepted but not the multiple ones. For example is the user selects "Checked Baggage" the selection is stored the correct procedure is processed, but if the user selects "SIDA" along with the "Checked Baggage" there is no stored data, just that first selection. Just the first entry is saved. Can...
1
1365
by: sumitpal | last post by:
PLz help, I am trying to store the datavalue of a checkboxlist control in a datacoloumn in database.The selection mode is multiple. How can i do that?
3
2788
by: dbuchanan | last post by:
How, at rundime, do I capture the fact that the parametrized query that fills a CheckBoxList results in an empty set. When the dataset is empty the CheckBoxList does not appear. I would like to properly inform the user of the fact. How is ths done? Thank you, Doug
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9476
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9263
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.