Novice
VS 2008
Windows XP SP3
Creating an ASP.Net form for potential customers to complete and
email.
Have a checkboxlist component with two items: Interior [item1] and
Exterior [item2].
I am using the following method to try to return the selected value
(s). If i select just Interior or Exterior it works fine. If I
select both, I get Interior Interior.
it's probably something simple, but i could use some help - thanks
private string GetInteriorExterior()
{
string myString = "";
for (int i = 0; i < chklstIntExter.Items.Count; i++)
{
if (chklstIntExter.Items[i].Selected)
{
myString += chklstIntExter.SelectedValue.ToString
() + " ";
}
}
return myString;
}