473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

need help to resolve concatenation error

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
Nov 18 '05 #1
2 2489
The following line of code should work:

strlist = strlist & "<li>"

Hope this helps.

~ Celia ~

"TJS" <no****@here.com> wrote in message
news:eN****************@TK2MSFTNGP12.phx.gbl...
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

Nov 18 '05 #2
Try this line:
strlist &= "<li>" & item.tostring

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"TJS" <no****@here.com> wrote in message
news:eN****************@TK2MSFTNGP12.phx.gbl...
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

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jonathan | last post by:
Why did the designers of PHP decide to use period (".") as the string concatenation operator rater than the obviously more logical plus ("+")? //JJ
5
by: Jonas Galvez | last post by:
Is it true that joining the string elements of a list is faster than concatenating them via the '+' operator? "".join() vs 'a'+'b'+'c' If so, can anyone explain why?
1
by: G Kannan | last post by:
Hey all! I have written a perl script to retrieve information from a HTML Form and insert the data into an Oracle database table. I am gettting the the following error message: "Use of...
18
by: Larry Menard | last post by:
Is it not valid to use concatenation in a WHERE ... LIKE clause? SELECT iam0.g_itemId FROM g2_ItemAttributesMap AS iam0, g2_ItemAttributesMap AS iam1 WHERE iam1.g_parentSequence LIKE...
33
by: genc_ymeri | last post by:
Hi over there, Propably this subject is discussed over and over several times. I did google it too but I was a little bit surprised what I read on internet when it comes 'when to use what'. Most...
1
by: vsp15584 | last post by:
Hii..i use the coding as below :- import java.applet.applet; import java.awt.*; import com.sun.j3d.utils.applet.mainframe; import com.sun.j3d.utils.universe.*; import...
1
by: psantosh12 | last post by:
Hello Frnds Please need help to resolve error.......... it is very very urgent........ The error is Runtime Error Description: An application error occurred on the server. The current custom...
3
by: Sindhu Rani | last post by:
i hav created 3 classes in 3 different files. am gettin an error durin compilation. wat shud i do??? C:\s\source>javac -d ..\classes devtestdrive.java devtestdrive.java:5: cannot resolve symbol...
34
by: raylopez99 | last post by:
StringBuilder better and faster than string for adding many strings. Look at the below. It's amazing how much faster StringBuilder is than string. The last loop below is telling: for adding...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.