---
title: "How to Select Values From Checkbox List In C# Asp.Net"  
description: "How to Select Values From Checkbox List In C# Asp.Net"  
author: "Norman Reedus"  
published: 2014-10-20  
updated: 2014-10-20  
canonical: https://www.mindstick.com/forum/2422/how-to-select-values-from-checkbox-list-in-c-sharp-asp-dot-net  
category: "asp.net"  
tags: ["c#", "asp.net"]  
reading_time: 2 minutes  

---

# How to Select Values From Checkbox List In C# Asp.Net

Hi,\
\
I Have a search [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) in which contains the [checkbox](https://www.mindstick.com/articles/291/how-should-use-checkbox-control-in-vb-dot-net) list of [projects](https://www.mindstick.com/articles/105927/how-to-excel-at-managing-multiple-projects) and [text boxes](https://www.mindstick.com/forum/34261/how-to-split-data-to-text-boxes-when-read-qr-code-data) for each projects with start date and end date, checklist items are binding dynamically from the databse, if there more projects then there are more checkboxes coming, while selecting all check boxes and searching the item([Search Button](https://answers.mindstick.com/qa/34597/what-is-site-search-button) is there) then there is lots of round trip process is going on(3-Tier Application) which taking lots of time to fill the grid control, Is there any process to send the whole checkbox list's data and text boxe's data into [database](https://www.mindstick.com/articles/12226/use-of-database-in-sencha-extjs-and-insert-record-from-user-form-using-ajax)([Stored procedure](https://www.mindstick.com/articles/803/using-stored-procedure-in-asp-dot-net)) in single roundtrip and fetch records.\
[Customer](https://www.mindstick.com/articles/325839/how-to-improve-your-business-level-of-customer-service) List:Customer 1 StartDateTextBox EndatedateTextBox \
Customer 2 StartDateTextBox EndatedateTextBox \
Customer 3 StartDateTextBox EndatedateTextBox \
Customer 4 StartDateTextBox EndatedateTextBox \
Customer 5 StartDateTextBox EndatedateTextBox \
Customer 6 StartDateTextBox EndatedateTextBox \
Customer 7 StartDateTextBox EndatedateTextBox \
Button Search\
GridVew Result:\
\
\
\
\
\
Here is the code which I am using currently\
if (lbxProjectList.Items[i].Selected.Equals(true))\
{\
\
EmployeeBillingService gs = new EmployeeBillingService(this.ContextBO);\
\
List<EmployeeBillingBO> gList = gs.GetEmployeeProjectDetails(Convert.ToInt32(ddlCustomerList.SelectedValue), Convert.ToInt32(lbxProjectList.Items[i].Value), Convert.ToDateTime([Session](https://www.mindstick.com/articles/12042/session-in-c-sharp)["DtStartDate"]), Convert.ToDateTime(Session["DtEndDate"]));\
|

## Replies

### Reply by Anonymous User

**Hi....\**\
**Are you developing a search engine ??\**\
The parameters are the values of the checkboxlist ??\
\
Then, as far as my knowledge goes, it should be like -\
-----------\
string p = string.empty;\
foreach items in checkboxlist\
{\
if items[1].isSelected == true {p=p+items[1].selectedvalue+",";}\
if items[2].isSelected == true {p=p+items[2].selectedvalue+",";}\
}\
Then, remove the last character i.e. "," and send all these values as parameters.


---

Original Source: https://www.mindstick.com/forum/2422/how-to-select-values-from-checkbox-list-in-c-sharp-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
