Listbox Control Not Returning Selected Values

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
 
M

Matthew Sajdera

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top