princesszea
Technical User
Hi,
I'm using the code below to get the values of all the checkboxlist on my page .
Code:
else if (cntrl.GetType() == typeof(CheckBoxList))
{
if (!string.IsNullOrEmpty(((CheckBoxList)cntrl).Text))
{
ids = ((CheckBoxList)cntrl).ID;
values = ((CheckBoxList)cntrl).Items.ToString();
}
}
The problem I’m having is if I had a checkbox list called chkage
Using the above method how do I add the selected values to
the code below
Code:
if (!string.IsNullOrEmpty(ids))
{
Session[id] = value;
if (Mapp.ContainsKey(ids))
{
//now get the db parameter name
string newValue = Mapp[ids];
if (!criteria.ContainsKey(newValue))
criteria.Add(newValue, value);
}
}
Thanks in advance