Listbox Control Not Returning Selected Values

  • Thread starter Thread starter Matthew Sajdera
  • Start date Start date
M

Matthew Sajdera

All -

I'm trying to capture the values in a multi-select ListBox and everything
I've tried isn't working. Here is the code snippet that is trying to grab
SELECTED values:

// Build Copy To string
foreach(ListItem itmCopyTo in lstCopyTo.Items)
{
if (itmCopyTo.Selected)
strCopy.Append(itmCopyTo.Value + "@xyz.com;");
}
The foreach works fine, but the itmCopyTo.Selected always returns false.

Thanks in Advance.

- Matt
 
All -

Thanks to anyone that looked at this. The code snippet is fine... it was a
stupid PostBack issue that I wasn't paying attention to.

Thanks,

- Matt
 
Back
Top