need help to resolve concatenation error

T

TJS

getting this error when retrieving selected items from a listbox:
----------------------------------------------------------------------------
---
BC30452: Operator '&' is not defined for types 'String' and
'System.Web.UI.WebControls.ListItem'.

for this code:
----------------------
Dim item As ListItem
Dim strList As String

For each item in StudyList.items
If item.selected then
strlist &= "<li>" & item 'fails here
End if
Next
 
C

Celia Oblinger

The following line of code should work:

strlist = strlist & "<li>"

Hope this helps.

~ Celia ~
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top