You can save checkboxes value with comma separate.
string SelectedValue = string.Empty,blankValue=string.Empty;
foreach (ListItem item in chklist.Items)
{
if (item.Selected)
{
SelectedValue += item.Value + ",";
}
else
{
blankValue += item.Value + ",";
}
}
Please note that this code is for
CheckBoxList
and not for
CheckBox
.
I have provided this solution as you have mentioned multiple checkboxes. So I assume that checkboxes are related items.
[Edit Start]
You need to follow some steps to save the value of selectedValue variable to SQL database.
1. Create a table with appropriate fields name and data type
2. Add a column for checkboxIds of varchar type
3. Create a store procedure with insert query which save the passed selectedvalue parameter in table
4. Create a function in your application, which will accept the parameter and passed it to the store procedure
5. Call this function and pass the variable
SelectedValue
NOTE : In the question you have write PL/SQL and you have tag it for Oracle. So I have changed it to the SQL.
[Edit End]